提交 39a43280 编写于 作者: D Dr. Stephen Henson

Sanity check input length in OPENSSL_uni2asc().

Thanks to Hanno Böck for reporting this bug.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 cec0a002
......@@ -42,7 +42,9 @@ char *OPENSSL_uni2asc(unsigned char *uni, int unilen)
{
int asclen, i;
char *asctmp;
/* string must contain an even number of bytes */
if (unilen & 1)
return NULL;
asclen = unilen / 2;
/* If no terminating zero allow for one */
if (!unilen || uni[unilen - 1])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册