]> granicus.if.org Git - php/commitdiff
Fix buffer underflow in gd_gif_in.c
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 19 Jun 2019 13:41:45 +0000 (15:41 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 19 Jun 2019 13:41:45 +0000 (15:41 +0200)
This has been fixed upstream in
https://github.com/libgd/libgd/commit/939d49a3a9d1cbcd2a37cea9eac9f9e5e9f9de78.

ext/gd/libgd/gd_gif_in.c

index ee987e8199f2a43a004b00e0f5081fc2492c4171..1f697236107f6987279177b5e87ce427ee0f334e 100644 (file)
@@ -381,7 +381,7 @@ GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroD
        if (flag) {
                scd->curbit = 0;
                scd->lastbit = 0;
-               scd->last_byte = 0;
+               scd->last_byte = 2;
                scd->done = FALSE;
                return 0;
        }