Merge pull request #6810 from bandi13/codeSonar_fixes

Fix 'negative character value'
This commit is contained in:
JacobBarthelmeh 2023-11-03 13:52:06 -06:00 committed by GitHub
commit 190b51ae6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -744,7 +744,7 @@ static char* expandValue(WOLFSSL_CONF *conf, const char* section,
strIdx += 2;
startIdx = strIdx;
}
while (*strIdx && (XISALNUM((int)(*strIdx)) || *strIdx == '_'))
while (*strIdx && (XISALNUM((unsigned char)*strIdx) || *strIdx == '_'))
strIdx++;
endIdx = strIdx;
if (startIdx == endIdx) {

View File

@ -1225,7 +1225,7 @@ static WC_INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
#ifndef TEST_IPV6
/* peer could be in human readable form */
if ( ((size_t)peer != INADDR_ANY) && isalpha((int)peer[0])) {
if ( ((size_t)peer != INADDR_ANY) && isalpha((unsigned char)peer[0])) {
#ifdef WOLFSSL_USE_POPEN_HOST
char host_ipaddr[4] = { 127, 0, 0, 1 };
int found = 1;