]> granicus.if.org Git - openssl/commit
Avoid buffer underflow in evp_test.
authorPauli <paul.dale@oracle.com>
Mon, 27 Feb 2017 04:26:16 +0000 (14:26 +1000)
committerRich Salz <rsalz@openssl.org>
Tue, 28 Feb 2017 14:14:50 +0000 (09:14 -0500)
commit533b178db6aea206f07810ea20ecd43a90c51855
treea6358005719fe240ea28115fc1e4e53832b1219e
parentfa7e9ed3d16c7e713b67a84de9683837610cd318
Avoid buffer underflow in evp_test.

The second loop in the remove_space function doesn't check for walking
back off of the start of the string while setting white space to 0.

This fix exits this loop once the pointer is before the (updated) beginning
of the string.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2752)
test/evp_test.c