parent
0315e441ec
commit
658f168874
|
@ -359,9 +359,8 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
|
|||
im =
|
||||
_gd2CreateFromFile (in, &sx, &sy, &cs, &vers, &fmt, &ncx, &ncy,
|
||||
&chunkIdx);
|
||||
|
||||
if (im == NULL) {
|
||||
gdFree (chunkIdx);
|
||||
/* No need to free chunkIdx as _gd2CreateFromFile does it for us. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ libgd_helper_programs += \
|
|||
|
||||
libgd_test_programs += \
|
||||
gd2/gd2_empty_file
|
||||
TESTS += \
|
||||
gd2/invalid_header.sh
|
||||
|
||||
if HAVE_LIBZ
|
||||
libgd_test_programs += \
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh -x
|
||||
base=${0%.sh}
|
||||
input="${base}.gd2"
|
||||
exec ./gd2/gd2_read_corrupt "${input}"
|
Loading…
Reference in New Issue