mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
commit
209223b97e
2 changed files with 18 additions and 0 deletions
|
@ -789,6 +789,7 @@ WebPResult WebPEncode(const uint8* Y,
|
||||||
return webp_failure;
|
return webp_failure;
|
||||||
}
|
}
|
||||||
p[new_size - 1] = 0;
|
p[new_size - 1] = 0;
|
||||||
|
*p_out = p;
|
||||||
*p_out_size_bytes = new_size;
|
*p_out_size_bytes = new_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
ext/gd/tests/bug66590_1.phpt
Normal file
17
ext/gd/tests/bug66590_1.phpt
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #66590 (imagewebp() doesn't pad to even length) - segfault
|
||||||
|
--SKIPIF--
|
||||||
|
<?php
|
||||||
|
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||||
|
if (!function_exists('imagewebp')) die('skip WebP support not available');
|
||||||
|
?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
$im = imagecreatetruecolor(6, 6);
|
||||||
|
ob_start();
|
||||||
|
imagewebp($im);
|
||||||
|
ob_end_clean();
|
||||||
|
echo "ready\n";
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
ready
|
Loading…
Add table
Add a link
Reference in a new issue