mirror of https://github.com/openssl/openssl.git
Check for errors in a2d_ASN1_OBJECT()
Check for error return in BN_div_word(). Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
07bed46f33
commit
8b9afbc0fc
|
@ -127,8 +127,12 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num)
|
||||||
if (tmp == NULL)
|
if (tmp == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
while (blsize--)
|
while (blsize--) {
|
||||||
tmp[i++] = (unsigned char)BN_div_word(bl, 0x80L);
|
BN_ULONG t = BN_div_word(bl, 0x80L);
|
||||||
|
if (t == (BN_ULONG)-1)
|
||||||
|
goto err;
|
||||||
|
tmp[i++] = (unsigned char)t;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
Loading…
Reference in New Issue