]> granicus.if.org Git - php/commit
Ensure bcmath scale is between 0 and INT_MAX
authorVladyslav Startsev <17382248+vladyslavstartsev@users.noreply.github.com>
Fri, 24 Apr 2020 23:18:09 +0000 (02:18 +0300)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 27 Apr 2020 09:53:26 +0000 (11:53 +0200)
commitb64aee97069fc77c141c787e5408d9e12f5971b4
tree645099cfe50b3bbcff19d83374e4f7cc94d833f5
parent48a34bc1202e9664121c9e9aa004c79ac71af3f5
Ensure bcmath scale is between 0 and INT_MAX

Make sure bcmatch scale is between 0 and INT_MAX, both for the
ini setting, and all the functions accepting a scale argument.
A ValueError is thrown if a function argument is out of range.

Closes GH-5455.
ext/bcmath/bcmath.c
ext/bcmath/php_bcmath.h
ext/bcmath/tests/bcscale_variation001.phpt
ext/bcmath/tests/bug60377.phpt
ext/bcmath/tests/bug72093.phpt
ext/bcmath/tests/negative_scale.phpt [new file with mode: 0644]