gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / glib-CVE-2021-27219-12.patch
CommitLineData
21b3b755
MW
1From f8273b9aded135fe07094faebd527e43851aaf6e Mon Sep 17 00:00:00 2001
2From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
3Date: Sun, 7 Feb 2021 23:32:40 +0100
4Subject: [PATCH 1/5] giochannel: Fix length_size bounds check
5
6The inverted condition is an obvious error introduced by ecdf91400e9a.
7
8Fixes https://gitlab.gnome.org/GNOME/glib/-/issues/2323
9
10(cherry picked from commit a149bf2f9030168051942124536e303af8ba6176)
11---
12 glib/giochannel.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/glib/giochannel.c b/glib/giochannel.c
16index 66c6591f0..0d9d5f223 100644
17--- a/glib/giochannel.c
18+++ b/glib/giochannel.c
19@@ -897,7 +897,7 @@ g_io_channel_set_line_term (GIOChannel *channel,
20 {
21 /* FIXME: We’re constrained by line_term_len being a guint here */
22 gsize length_size = strlen (line_term);
23- g_return_if_fail (length_size > G_MAXUINT);
24+ g_return_if_fail (length_size <= G_MAXUINT);
25 length_unsigned = (guint) length_size;
26 }
27
28--
292.30.1
30