asn1/a_int.c: fix "next negative minimum" corner case in c2i_ibuf.
authorAndy Polyakov <appro@openssl.org>
Fri, 28 Apr 2017 08:06:35 +0000 (10:06 +0200)
committerAndy Polyakov <appro@openssl.org>
Sun, 30 Apr 2017 13:19:20 +0000 (15:19 +0200)
commitd3d51adc87137fec7472a7e741490622ce725671
tree5b4d97e16d3568482735587a8e093c4a055a24cd
parent913d3a644edafee2a20c620e8625e9f3be49f643
asn1/a_int.c: fix "next negative minimum" corner case in c2i_ibuf.

"Next" refers to negative minimum "next" to one presentable by given
number of bytes. For example, -128 is negative minimum presentable by
one byte, and -256 is "next" one.

Thanks to Kazuki Yamaguchi for report, GH#3339

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 1e93d619b78832834ae32f5c0c1b0e466267f72d)
crypto/asn1/a_int.c