[gdk-pixbuf: 2/5] Add an assertion that checks for maximum LZW code size
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf: 2/5] Add an assertion that checks for maximum LZW code size
- Date: Tue, 9 Aug 2022 14:49:06 +0000 (UTC)
commit 0cf97225c9c227d11fc4ddf9cba8e8480672ee1b
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Feb 2 12:38:45 2022 +1300
Add an assertion that checks for maximum LZW code size
gdk-pixbuf/lzw.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gdk-pixbuf/lzw.c b/gdk-pixbuf/lzw.c
index 105daf2b1..15293560b 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]