mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-08 03:44:13 -04:00
25 lines
791 B
Plaintext
25 lines
791 B
Plaintext
$NetBSD: patch-af,v 1.2 2011/08/03 10:01:25 drochner Exp $
|
|
|
|
--- gdk-pixbuf/io-gif.c.orig 2002-12-18 19:49:01.000000000 +0000
|
|
+++ gdk-pixbuf/io-gif.c
|
|
@@ -617,7 +617,7 @@ clip_frame (GifContext *context, int *x,
|
|
*w = MIN (context->width, context->x_offset + context->frame_len) - *x;
|
|
*h = MIN (context->height, context->y_offset + context->frame_height) - *y;
|
|
|
|
- if (w > 0 && h > 0)
|
|
+ if (*w > 0 && *h > 0)
|
|
return;
|
|
|
|
/* The frame is completely off-bounds */
|
|
@@ -944,6 +944,10 @@ gif_prepare_lzw (GifContext *context)
|
|
return -1;
|
|
}
|
|
|
|
+ if (context->lzw_set_code_size > MAX_LZW_BITS) {
|
|
+ return -1;
|
|
+ }
|
|
+
|
|
context->lzw_code_size = context->lzw_set_code_size + 1;
|
|
context->lzw_clear_code = 1 << context->lzw_set_code_size;
|
|
context->lzw_end_code = context->lzw_clear_code + 1;
|