php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch swc-len-fix-php7.0 for GetImageSize related Bug #74910Patch version 2017-07-12 12:54 UTC Return to Bug #74910 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: adam.rosadzinski@home.net.pl--- a/ext/standard/image.c 2017-05-09 13:41:03.000000000 +0200 +++ b/ext/standard/image.c 2017-07-12 14:05:18.000000000 +0200 @@ -201,7 +201,7 @@ static struct gfxinfo *php_handle_swc(ph long bits; unsigned char a[64]; - unsigned long len=64, szlength; + unsigned long len = 64, szlength = 0; int factor = 1,maxfactor = 16; int status = 0; unsigned char *b, *buf = NULL; @@ -215,7 +215,7 @@ static struct gfxinfo *php_handle_swc(ph if (php_stream_read(stream, (char *) a, sizeof(a)) != sizeof(a)) return NULL; - if (uncompress(b, &len, a, sizeof(a)) != Z_OK) { + if (uncompress(b, &szlength, a, sizeof(a)) != Z_OK) { /* failed to decompress the file, will try reading the rest of the file */ if (php_stream_seek(stream, 8, SEEK_SET)) { return NULL; |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Sun Oct 06 14:01:27 2024 UTC |