diff options
| author | Urban Müller | 2010-03-15 16:53:12 +0000 | 
|---|---|---|
| committer | Urban Müller | 2010-03-15 16:53:12 +0000 | 
| commit | 26d4c1ac3abd8638537d16506c7ec24101c59811 (patch) | |
| tree | 26738f30934e1b682af65068730c67027c567786 /it.class | |
| parent | 0718ca36ffc5764fbe5398a7a541a3740cdd9b0d (diff) | |
| download | itools-26d4c1ac3abd8638537d16506c7ec24101c59811.tar.gz itools-26d4c1ac3abd8638537d16506c7ec24101c59811.tar.bz2 itools-26d4c1ac3abd8638537d16506c7ec24101c59811.zip | |
save segfault causing input
Diffstat (limited to 'it.class')
| -rw-r--r-- | it.class | 10 | 
1 files changed, 6 insertions, 4 deletions
| @@ -512,8 +512,6 @@ static function _exec_quotevalue($value)   */  static function imageconvert($p)  { -	$result = false; -  	if (!(($imagetype = @exif_imagetype($p['in'])) && ($type = image_type_to_extension($imagetype, false))))  	{  		if (@get_class(it_xml::create(fopen($p['in'], "r"), array('prefix' => "_imageconvert_", 'safety' => 0))) == "_imageconvert_svg") @@ -527,9 +525,13 @@ static function imageconvert($p)  	$p['-opts'] = array('-thumbnail' => $p['size']) + (array)$p['-opts'];  	if (in_array($type, explode(',', $p['types'])))	# Valid type? -		$result = it::exec("convert 2>&1 -flatten -quality 75 {-opts} {in} {type}:{out}", $p) === ""; +	{ +		$cmdoutput = it::exec('convert 2>&1 -flatten -quality 75 {-opts} {in} {type}:{out} || echo "SHELL ERROR $?"', $p); +		if (it::match('SHELL ERROR 139', $cmdoutput)) # segmentation fault +			copy($p['in'], "/tmp/imageconvert.segfault.in"); +	} -	return $result; +	return $cmdoutput === "";  } |