Reported by: Scott McPeak <scott.g.mcpeak@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14768)
c2i_ibuf(ret->data, &neg, *pp, len);
- if (neg)
+ if (neg != 0)
ret->type |= V_ASN1_NEG;
+ else
+ ret->type &= ~V_ASN1_NEG;
*pp += len;
if (a != NULL)
return ret;
err:
ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
- if ((a == NULL) || (*a != ret))
+ if (a == NULL || *a != ret)
ASN1_INTEGER_free(ret);
return NULL;
}