Skip to content

Commit

Permalink
Merge pull request #1149 from sjinks/image-crash
Browse files Browse the repository at this point in the history
[BUG] [CRASH] Segmentation fault in Phalcon\Image\Adapter\Gd::check()
  • Loading branch information
Phalcon committed Aug 24, 2013
2 parents 6438859 + b41c0e2 commit 9069465
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/image/adapter/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ PHALCON_INIT_CLASS(Phalcon_Image_Adapter_GD){
*/
PHP_METHOD(Phalcon_Image_Adapter_GD, check){

zval *ret, *gd_info, *gd_version, *version, *exception_message;
zval *ret = NULL, *gd_info, *gd_version, *version, *exception_message;
zval *pattern, *matches;
int rc;

Expand Down Expand Up @@ -131,6 +131,8 @@ PHP_METHOD(Phalcon_Image_Adapter_GD, check){
return;
}

PHALCON_INIT_NVAR(ret);
ZVAL_TRUE(ret);
phalcon_update_static_property(SL("phalcon\\image\\adapter\\gd"), SL("_checked"), ret TSRMLS_CC);

RETURN_MM_TRUE;
Expand Down

0 comments on commit 9069465

Please sign in to comment.