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:17:03 +0000 (15:17 +0200)
commit1e93d619b78832834ae32f5c0c1b0e466267f72d
treea747477cc05565c3cfb67d0d65e4298f9de8743d
parent595b2a42375427a254ad5a8c85870efea839a9b9
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>
crypto/asn1/a_int.c