diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/tests/gdimagescale/bug_overflow_large_new_size.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/tests/gdimagescale/bug_overflow_large_new_size.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug_overflow_large_new_size.c b/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug_overflow_large_new_size.c index 0a8503b745f..20cda1d03e2 100644 --- a/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug_overflow_large_new_size.c +++ b/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug_overflow_large_new_size.c @@ -15,13 +15,14 @@ int main() return 1; } gdImageSetInterpolationMethod(im, GD_BELL); - + /* here the call may pass if the system has enough memory (physical or swap) or fails (overflow check or alloc fails. in both cases the tests pass */ im2 = gdImageScale(im,0x15555556, 1); if (im2 == NULL) { printf("gdImageScale failed, expected (out of memory or overflow validation\n"); + gdImageDestroy(im); return 0; } gdImageDestroy(im); |