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) {
|
||||
XMEMCPY(&output[*idx], str, strSz);
|
||||
*idx += strSz;
|
||||
XMEMCPY(&output[*idx], attr, attrSz);
|
||||
*idx += attrSz;
|
||||
if (attrSz > 0) {
|
||||
XMEMCPY(&output[*idx], attr, attrSz);
|
||||
*idx += attrSz;
|
||||
}
|
||||
}
|
||||
}
|
||||
return totalSz;
|
||||
|
Reference in New Issue
Block a user