diff options
Diffstat (limited to 'ext/gd/libgd/gd.c')
-rw-r--r-- | ext/gd/libgd/gd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index afa7e58f33..bb2f9c23aa 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -131,6 +131,10 @@ gdImagePtr gdImageCreate (int sx, int sy) return NULL; } + if (overflow2(sizeof(unsigned char *), sx)) { + return NULL; + } + im = (gdImage *) gdCalloc(1, sizeof(gdImage)); /* Row-major ever since gd 1.3 */ |