mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
giochannel: Don't store negative line_term_len in GIOChannel struct
Adding test coverage indicated that this was another bug in0cc11f74
. Fixes:0cc11f74
"giochannel: Forbid very long line terminator strings" Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2323 Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
a149bf2f90
commit
5dc8b0014c
@ -905,7 +905,7 @@ g_io_channel_set_line_term (GIOChannel *channel,
|
||||
|
||||
g_free (channel->line_term);
|
||||
channel->line_term = line_term ? g_memdup2 (line_term, length_unsigned) : NULL;
|
||||
channel->line_term_len = length;
|
||||
channel->line_term_len = length_unsigned;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user