forked from wolfSSL/wolfssl
wolfcrypt/src/asn.c: fix null pointer deref in SetReqAttribSingle() (clang-analyzer-core.NonNullParamChecker).
This commit is contained in:
@ -26227,8 +26227,10 @@ static int SetReqAttribSingle(byte* output, int* idx, char* attr, int attrSz,
|
|||||||
if (strSz > 0) {
|
if (strSz > 0) {
|
||||||
XMEMCPY(&output[*idx], str, strSz);
|
XMEMCPY(&output[*idx], str, strSz);
|
||||||
*idx += strSz;
|
*idx += strSz;
|
||||||
XMEMCPY(&output[*idx], attr, attrSz);
|
if (attrSz > 0) {
|
||||||
*idx += attrSz;
|
XMEMCPY(&output[*idx], attr, attrSz);
|
||||||
|
*idx += attrSz;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return totalSz;
|
return totalSz;
|
||||||
|
Reference in New Issue
Block a user