Skip to content

Commit ed4b87e

Browse files
fix for clang-tidy null dereference error
1 parent 5fbadbb commit ed4b87e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

wolfcrypt/src/asn.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15400,7 +15400,9 @@ word32 SetLength(word32 length, byte* output)
1540015400
word32 SetLengthEx(word32 length, byte* output, byte isIndef)
1540115401
{
1540215402
if (isIndef) {
15403-
output[0] = ASN_INDEF_LENGTH;
15403+
if (output != NULL) {
15404+
output[0] = ASN_INDEF_LENGTH;
15405+
}
1540415406
return 1;
1540515407
}
1540615408
else {

0 commit comments

Comments
 (0)