Skip to content

Commit

Permalink
- Fix #53492, fix crash if aa steps are invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrejoye committed Dec 8, 2010
1 parent 27ecaa7 commit 088a6ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/gd/gd.c
Expand Up @@ -4290,6 +4290,11 @@ PHP_FUNCTION(imagepstext)
return;
}

if (aa_steps != 4 || aa_steps != 16) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "AA steps must be 4 or 16");
RETURN_FALSE;
}

ZEND_FETCH_RESOURCE(bg_img, gdImagePtr, &img, -1, "Image", le_gd);
ZEND_FETCH_RESOURCE(f_ind, int *, &fnt, -1, "Type 1 font", le_ps_font);

Expand Down

0 comments on commit 088a6ad

Please sign in to comment.