Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ PHP NEWS
- FTP:
. Fix double free in ext/ftp data_accept() on accept failure. (alepacheco)

- GD:
. Fixed imagetruecolortopalette() error message. (Marc Bennewitz)

- Hash:
. Fix GOST and Snefru digests of 512 MiB or more. (Martin Mirchev)

Expand Down
2 changes: 1 addition & 1 deletion ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ PHP_FUNCTION(imagetruecolortopalette)
im = php_gd_libgdimageptr_from_zval_p(IM);

if (ncolors <= 0 || ZEND_LONG_INT_OVFL(ncolors)) {
zend_argument_value_error(3, "must be greater than 0 and less than %d", INT_MAX);
zend_argument_value_error(3, "must be between 1 and %d", INT_MAX);
RETURN_THROWS();
}

Expand Down
2 changes: 1 addition & 1 deletion ext/gd/tests/bug72697.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ trycatch_dump(
?>
DONE
--EXPECT--
!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be greater than 0 and less than 2147483647
!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be between 1 and 2147483647
DONE
2 changes: 1 addition & 1 deletion ext/gd/tests/imagetruecolortopalette_error3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ trycatch_dump(

?>
--EXPECT--
!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be greater than 0 and less than 2147483647
!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be between 1 and 2147483647
4 changes: 2 additions & 2 deletions ext/gd/tests/imagetruecolortopalette_error4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ trycatch_dump(

?>
--EXPECT--
!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be greater than 0 and less than 2147483647
!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be greater than 0 and less than 2147483647
!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be between 1 and 2147483647
!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be between 1 and 2147483647
Loading