fixed Null-dereference READ
https://oss-fuzz.com/testcase-detail/5734505646391296 Thanks to OSS-Fuzz
This commit is contained in:
parent
61cd7fcdb2
commit
3c286b3cb1
|
@ -68,7 +68,7 @@ int sc_asn1_read_tag(const u8 ** buf, size_t buflen, unsigned int *cla_out,
|
||||||
|
|
||||||
*buf = NULL;
|
*buf = NULL;
|
||||||
|
|
||||||
if (left == 0)
|
if (left == 0 || !p)
|
||||||
return SC_ERROR_INVALID_ASN1_OBJECT;
|
return SC_ERROR_INVALID_ASN1_OBJECT;
|
||||||
if (*p == 0xff || *p == 0) {
|
if (*p == 0xff || *p == 0) {
|
||||||
/* end of data reached */
|
/* end of data reached */
|
||||||
|
|
Loading…
Reference in New Issue