From: Robert Ancell <robert.ancell@canonical.com>
Date: Wed, 2 Feb 2022 12:38:45 +1300
Subject: Add an assertion that checks for maximum LZW code size
Origin: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/0cf97225c9c227d11fc4ddf9cba8e8480672ee1b

---
 gdk-pixbuf/lzw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdk-pixbuf/lzw.c b/gdk-pixbuf/lzw.c
index 105daf2b139a..15293560ba82 100644
--- a/gdk-pixbuf/lzw.c
+++ b/gdk-pixbuf/lzw.c
@@ -121,6 +121,8 @@ lzw_decoder_new (guint8 code_size)
         LZWDecoder *self;
         int i;
 
+        g_return_val_if_fail (code_size <= LZW_CODE_MAX, NULL);
+
         self = g_object_new (lzw_decoder_get_type (), NULL);
 
         self->min_code_size = code_size;
-- 
2.37.2

