Skip to content

Commit 126df1d

Browse files
committed
src/internal.c: in wolfSSL_ERR_reason_error_string(), return "unknown error number" when error==0 and !OPENSSL_EXTRA, to avoid provoking clang-analyzer-optin.core.EnumCastOutOfRange.
1 parent 13ec0f0 commit 126df1d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/internal.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25165,11 +25165,13 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e)
2516525165
return wc_GetErrorString(error);
2516625166
}
2516725167

25168-
#ifdef OPENSSL_EXTRA
2516925168
if (error == 0) {
25169+
#ifdef OPENSSL_EXTRA
2517025170
return "ok";
25171-
}
25171+
#else
25172+
return "unknown error number";
2517225173
#endif
25174+
}
2517325175

2517425176
switch ((enum wolfSSL_ErrorCodes)error) {
2517525177

0 commit comments

Comments
 (0)