]> granicus.if.org Git - php/commit
Fix #79015: undefined-behavior in php_date.c
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 23 Dec 2019 13:42:54 +0000 (14:42 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 3 Jan 2020 13:31:03 +0000 (14:31 +0100)
commitb48f2625b57f70eea858033e623e6bf13b595e3b
tree2b31d1e68a118561431ae485b7993b7deee88365
parent0cecf83b264cbbb5683ab8a843cc4a4d9c294644
Fix #79015: undefined-behavior in php_date.c

We check that the given microsecond fraction is in the valid range
[0, 1000000[, and otherwise mark it as invalid.  We also drop the
useless do loop; a plain block is sufficient here.
NEWS
ext/date/php_date.c
ext/date/tests/bug79015.phpt [new file with mode: 0644]