Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zim_Phalcon_Image_Adapter_Imagick__mask: ‘ce0’ may be used uninitialized in this function #1214

Closed
ghost opened this issue Sep 10, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 10, 2013

Relevant code:

PHP_METHOD(Phalcon_Image_Adapter_Imagick, _mask){

    zval *mask, *im, *mask_im, *realpath, *blob, *matte, *composite, *tmp, *index, *next = NULL, *type;
    zend_class_entry *ce0;

    PHALCON_MM_GROW();

    phalcon_fetch_params(1, 1, 0, &mask);

    PHALCON_OBS_VAR(im);
    phalcon_read_property_this(&im, this_ptr, SL("_image"), PH_NOISY_CC);

    PHALCON_OBS_VAR(type);
    phalcon_read_property_this(&type, this_ptr, SL("_type"), PH_NOISY_CC);
    PHALCON_INIT_VAR(mask_im);
    object_init_ex(mask_im, ce0);

In object_init_ex() ce0 is not initialized. Did you forget to call something like

ce0 = zend_fetch_class(SL("Imagick"), ZEND_FETCH_CLASS_AUTO TSRMLS_CC);

@ghost
Copy link
Author

ghost commented Sep 10, 2013

@dreamsxin Could you please take a look?

@dreamsxin
Copy link
Contributor

Check them now

@dreamsxin
Copy link
Contributor

@sjinks In the Travis has error, You have the time please help look?

Starting test 'ImageTest::testGD'.

zend_mm_heap corrupted

phalcon pushed a commit that referenced this issue Sep 12, 2013
@phalcon phalcon closed this as completed Sep 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant