diff --git a/fusee/fusee-primary/src/lib/vsprintf.c b/fusee/fusee-primary/src/lib/vsprintf.c index 0dd4c4514..b356b443a 100644 --- a/fusee/fusee-primary/src/lib/vsprintf.c +++ b/fusee/fusee-primary/src/lib/vsprintf.c @@ -508,7 +508,7 @@ char *uuid_string(char *buf, char *end, const uint8_t *addr, if (uc) { p = uuid; do { - *p = toupper(*p); + *p = toupper((unsigned char)*p); } while (*(++p)); } @@ -1177,7 +1177,7 @@ do { \ case FORMAT_TYPE_PTR: save_arg(void *); /* skip all alphanumeric pointer suffixes */ - while (isalnum(*fmt)) + while (isalnum((unsigned char)*fmt)) fmt++; break; @@ -1340,7 +1340,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const uint32_t *bin_buf case FORMAT_TYPE_PTR: str = pointer(fmt+1, str, end, get_arg(void *), spec); - while (isalnum(*fmt)) + while (isalnum((unsigned char)*fmt)) fmt++; break; diff --git a/sept/sept-secondary/src/lib/vsprintf.c b/sept/sept-secondary/src/lib/vsprintf.c index e0393f4c0..b356b443a 100644 --- a/sept/sept-secondary/src/lib/vsprintf.c +++ b/sept/sept-secondary/src/lib/vsprintf.c @@ -508,7 +508,7 @@ char *uuid_string(char *buf, char *end, const uint8_t *addr, if (uc) { p = uuid; do { - *p = toupper(*p); + *p = toupper((unsigned char)*p); } while (*(++p)); } @@ -882,7 +882,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) case FORMAT_TYPE_PTR: str = pointer(fmt+1, str, end, va_arg(args, void *), spec); - while (isalnum(*fmt)) + while (isalnum((unsigned char)*fmt)) fmt++; break; @@ -1177,7 +1177,7 @@ do { \ case FORMAT_TYPE_PTR: save_arg(void *); /* skip all alphanumeric pointer suffixes */ - while (isalnum(*fmt)) + while (isalnum((unsigned char)*fmt)) fmt++; break; @@ -1340,7 +1340,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const uint32_t *bin_buf case FORMAT_TYPE_PTR: str = pointer(fmt+1, str, end, get_arg(void *), spec); - while (isalnum(*fmt)) + while (isalnum((unsigned char)*fmt)) fmt++; break; diff --git a/thermosphere/src/lib/vsprintf.c b/thermosphere/src/lib/vsprintf.c index e0393f4c0..b356b443a 100644 --- a/thermosphere/src/lib/vsprintf.c +++ b/thermosphere/src/lib/vsprintf.c @@ -508,7 +508,7 @@ char *uuid_string(char *buf, char *end, const uint8_t *addr, if (uc) { p = uuid; do { - *p = toupper(*p); + *p = toupper((unsigned char)*p); } while (*(++p)); } @@ -882,7 +882,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) case FORMAT_TYPE_PTR: str = pointer(fmt+1, str, end, va_arg(args, void *), spec); - while (isalnum(*fmt)) + while (isalnum((unsigned char)*fmt)) fmt++; break; @@ -1177,7 +1177,7 @@ do { \ case FORMAT_TYPE_PTR: save_arg(void *); /* skip all alphanumeric pointer suffixes */ - while (isalnum(*fmt)) + while (isalnum((unsigned char)*fmt)) fmt++; break; @@ -1340,7 +1340,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const uint32_t *bin_buf case FORMAT_TYPE_PTR: str = pointer(fmt+1, str, end, get_arg(void *), spec); - while (isalnum(*fmt)) + while (isalnum((unsigned char)*fmt)) fmt++; break;