Skip to content

Commit 190b51a

Browse files
Merge pull request #6810 from bandi13/codeSonar_fixes
Fix 'negative character value'
2 parents b8ea978 + 0925f8a commit 190b51a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/conf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ static char* expandValue(WOLFSSL_CONF *conf, const char* section,
744744
strIdx += 2;
745745
startIdx = strIdx;
746746
}
747-
while (*strIdx && (XISALNUM((int)(*strIdx)) || *strIdx == '_'))
747+
while (*strIdx && (XISALNUM((unsigned char)*strIdx) || *strIdx == '_'))
748748
strIdx++;
749749
endIdx = strIdx;
750750
if (startIdx == endIdx) {

wolfssl/test.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ static WC_INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
12251225

12261226
#ifndef TEST_IPV6
12271227
/* peer could be in human readable form */
1228-
if ( ((size_t)peer != INADDR_ANY) && isalpha((int)peer[0])) {
1228+
if ( ((size_t)peer != INADDR_ANY) && isalpha((unsigned char)peer[0])) {
12291229
#ifdef WOLFSSL_USE_POPEN_HOST
12301230
char host_ipaddr[4] = { 127, 0, 0, 1 };
12311231
int found = 1;

0 commit comments

Comments
 (0)