|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-05 07:53 UTC] scott at macvicar dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 14:00:02 2025 UTC |
Description: ------------ Actual imagick error: Zero-length blob not permitted It happens when loading zero length blob. imagick.c incorrectly assumes on line 1233 , that handle->exception.description is always defined and crashes when it is not, see here: (gdb) print handle->exception $4 = {severity = BlobError, error_number = 0, reason = 0x8686780 "Zero-length blob not permitted `'", description = 0x0, signature = 2880220587} This causes it to access handle->image that is NULL and sig11. Furthermore, in cleanup code, imagick.c:666, efree( IMAGICK_G( last_error_description ) ) ; Segfaults, since last_error_description is NULL. Patch attached. Have a nice day. Reproduce code: --------------- patch to imagick.c 665d664 < 667,669c666 < if(IMAGICK_G(last_error_description )){ < efree( IMAGICK_G( last_error_description ) ) ; < } --- > efree( IMAGICK_G( last_error_description ) ) ; 1235c1232,1233 < if ( handle->image && handle->image->exception.description ) --- > > if ( handle->image->exception.description )