summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-2.patch')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-2.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-2.patch b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-2.patch
new file mode 100644
index 0000000000..2ba26075df
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-2.patch
@@ -0,0 +1,38 @@
1From e069c50467712e6d607822afd6b6c15c2c343dff Mon Sep 17 00:00:00 2001
2From: Simon McVittie <smcv@collabora.com>
3Date: Mon, 8 Feb 2021 10:34:50 +0000
4Subject: [PATCH 2/5] giochannel: Don't store negative line_term_len in
5 GIOChannel struct
6
7Adding test coverage indicated that this was another bug in 0cc11f74.
8
9Fixes: 0cc11f74 "giochannel: Forbid very long line terminator strings"
10Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2323
11Signed-off-by: Simon McVittie <smcv@collabora.com>
12(cherry picked from commit 5dc8b0014c03e7491d93b90275ab442e888a9628)
13
14Upstream-Status: Backport [https://mirrors.ocf.berkeley.edu/ubuntu/pool/main/g/glib2.0/glib2.0_2.64.6-1~ubuntu20.04.3.debian.tar.xz]
15CVE: CVE-2021-27219
16Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
17
18---
19 glib/giochannel.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/glib/giochannel.c b/glib/giochannel.c
23index c3f3102ff..19bb06ba6 100644
24--- a/glib/giochannel.c
25+++ b/glib/giochannel.c
26@@ -902,7 +902,7 @@ g_io_channel_set_line_term (GIOChannel *channel,
27
28 g_free (channel->line_term);
29 channel->line_term = line_term ? g_memdup2 (line_term, length_unsigned) : NULL;
30- channel->line_term_len = length;
31+ channel->line_term_len = length_unsigned;
32 }
33
34 /**
35--
36GitLab
37
38