[glib: 2/4] giochannel: Don't store negative line_term_len in GIOChannel struct
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/4] giochannel: Don't store negative line_term_len in GIOChannel struct
- Date: Mon, 8 Feb 2021 11:07:00 +0000 (UTC)
commit 5dc8b0014c03e7491d93b90275ab442e888a9628
Author: Simon McVittie <smcv collabora com>
Date: Mon Feb 8 10:34:50 2021 +0000
giochannel: Don't store negative line_term_len in GIOChannel struct
Adding test coverage indicated that this was another bug in 0cc11f74.
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>
glib/giochannel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/giochannel.c b/glib/giochannel.c
index 8516c0b5e..e93c4b458 100644
--- a/glib/giochannel.c
+++ b/glib/giochannel.c
@@ -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;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]