Skip to content

Commit 0c4feb0

Browse files
committed
wolfcrypt/src/asn.c: revert earlier changes in EncodeName(), and add local S390-specific pragma to inhibit false-positive -Wnull-dereference.
1 parent d6aa157 commit 0c4feb0

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29922,9 +29922,6 @@ static int EncodeName(EncodedName* name, const char* nameStr,
2992229922
name->used = 0;
2992329923
return 0;
2992429924
}
29925-
nameSz = (word32)cname->custom.valSz;
29926-
oid = cname->custom.oid;
29927-
oidSz = (word32)cname->custom.oidSz;
2992829925
}
2992929926
#else
2993029927
(void)cname;
@@ -29964,9 +29961,17 @@ static int EncodeName(EncodedName* name, const char* nameStr,
2996429961
break;
2996529962
#ifdef WOLFSSL_CUSTOM_OID
2996629963
case ASN_CUSTOM_NAME:
29967-
/* oid setup is above (mitigating false positive
29968-
* -Wnull-dereference).
29969-
*/
29964+
#ifdef __s390x__
29965+
/* inhibit arch-specific false positive. */
29966+
PRAGMA_GCC_DIAG_PUSH;
29967+
PRAGMA_GCC("GCC diagnostic ignored \"-Wnull-dereference\"");
29968+
#endif
29969+
nameSz = (word32)cname->custom.valSz;
29970+
oid = cname->custom.oid;
29971+
oidSz = (word32)cname->custom.oidSz;
29972+
#ifdef __s390x__
29973+
PRAGMA_GCC_DIAG_POP;
29974+
#endif
2997029975
break;
2997129976
#endif
2997229977
#ifdef WOLFSSL_CERT_REQ

0 commit comments

Comments
 (0)