mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-02-03 23:15:06 +01:00
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