]> git.pld-linux.org Git - packages/gd.git/blob - gd-loop.patch
- release 6 (libavif 0.11.x)
[packages/gd.git] / gd-loop.patch
1 --- libgd-2.1.0/src/gd_gif_in.c.orig    2013-07-04 16:17:44.855925413 +0200
2 +++ libgd-2.1.0/src/gd_gif_in.c 2013-07-04 16:35:04.025881804 +0200
3 @@ -498,15 +498,16 @@ LWZReadByte_(gdIOCtx *fd, LZW_STATIC_DAT
4                         return sd->firstcode;
5                 } else if(code == sd->end_code) {
6                         int count;
7 +                       int max_count = 1024;
8                         unsigned char buf[260];
9  
10                         if(*ZeroDataBlockP) {
11                                 return -2;
12                         }
13  
14 -                       while((count = GetDataBlock(fd, buf, ZeroDataBlockP)) > 0);
15 +                       while((count = GetDataBlock(fd, buf, ZeroDataBlockP)) > 0 && (--max_count >= 0));
16  
17 -                       if(count != 0) {
18 +                       if((count != 0) || (max_count < 0)) {
19                                 return -2;
20                         }
21                 }
This page took 0.061459 seconds and 3 git commands to generate.