gd/gd-security.patch

22 lines
316 B
Diff

--- gd.c
+++ gd.c
@@ -147,6 +147,7 @@
}
if (overflow2(sizeof (int *), sy)) {
+ gdFree(im);
return 0;
}
--- gd_gd.c
+++ gd_gd.c
@@ -149,6 +149,8 @@
{
im = gdImageCreate (*sx, *sy);
}
+ if (!im)
+ goto fail1;
if (!_gdGetColors (in, im, gd2xFlag))
{
goto fail2;