Avoid calling memcpy with lenght of 0
authorKurt Roeckx <kurt@roeckx.be>
Thu, 26 May 2016 16:40:32 +0000 (18:40 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Fri, 27 May 2016 19:01:12 +0000 (21:01 +0200)
commit369e93398b68b8a328e6c1d766222b2d281ef016
treea8a9b8113ad022027b4543e472c5c7ab1176473e
parent4379d5ce782d4cc83840db7b7b66e18d325dfd3e
Avoid calling memcpy with lenght of 0

We can call memcpy() with a pointer 1 past the last allocated byte and length
of 0 and you can argue that that's undefined behaviour.

Reported by tis-interpreter

Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #1132
crypto/asn1/a_bitstr.c