提交 8b9afbc0 编写于 作者: D Dr. Stephen Henson

Check for errors in a2d_ASN1_OBJECT()

Check for error return in BN_div_word().
Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 07bed46f
......@@ -127,8 +127,12 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num)
if (tmp == NULL)
goto err;
}
while (blsize--)
tmp[i++] = (unsigned char)BN_div_word(bl, 0x80L);
while (blsize--) {
BN_ULONG t = BN_div_word(bl, 0x80L);
if (t == (BN_ULONG)-1)
goto err;
tmp[i++] = (unsigned char)t;
}
} else {
for (;;) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册