]> granicus.if.org Git - php/commit
Fixed bug #75221 (Argon2i always throws NUL at the end)
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 18 Sep 2017 16:09:53 +0000 (18:09 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Thu, 12 Oct 2017 10:52:37 +0000 (12:52 +0200)
commit3f8961dfac96a992df2516c0e383e6820eedd31b
tree814d87fd905780df1876eb38148da73ed6a16ca4
parentee3650742389883f0f3e4d4d009c236dab13bb7d
Fixed bug #75221 (Argon2i always throws NUL at the end)

Apparently, `argon2_encodedlen()` also counts the terminating NUL byte;
that doesn't appear to be documented somewhere, but from looking at the
implementation[1] it is pretty obvious.  Therefore, the respective
`zend_string` has to be one byte shorter.

[1] <https://github.com/P-H-C/phc-winner-argon2/blob/20161029/src/argon2.c#L431-L436>
NEWS
ext/standard/password.c
ext/standard/tests/password/bug75221.phpt [new file with mode: 0644]