aboutsummaryrefslogtreecommitdiff
path: root/test/ssltest.c
diff options
context:
space:
mode:
authorBenjamin Kaduk <bkaduk@akamai.com>2016-03-08 16:44:57 -0600
committerRich Salz <rsalz@akamai.com>2016-03-09 20:52:19 -0500
commita1673e1536729d49cb758b988ac7be368e9b1fdb (patch)
tree04eba61c46623b06f50f0861ecc44aaf426b3d70 /test/ssltest.c
parent80e8fdbe793c8861411e9f49ea290847fa99f4c7 (diff)
downloadopenssl-a1673e1536729d49cb758b988ac7be368e9b1fdb.zip
openssl-a1673e1536729d49cb758b988ac7be368e9b1fdb.tar.gz
openssl-a1673e1536729d49cb758b988ac7be368e9b1fdb.tar.bz2
Avoid negative array index in BIO_debug_callback()
BIO_snprintf() can return -1 on truncation (and overflow as of commit 9cb177301fdab492e4cfef376b28339afe3ef663). Though neither can realistically occur while printing a pointer and short fixed string into a buffer of length 256, the analysis to confirm that this the case goes somewhat far up the call chain, and not all static analyzers can successfully follow the chain of logic. It's easy enough to clamp the returned length to be nonnegative before continuing, which appeases the static analyzer and does not harm the subsequent code. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/ssltest.c')
0 files changed, 0 insertions, 0 deletions