Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds missing casts (#21123) #21127

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/s_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2457,7 +2457,7 @@ int s_client_main(int argc, char **argv)
do {
mbuf_len = BIO_gets(fbio, mbuf, BUFSIZZ);
}
while (mbuf_len > 3 && (!isdigit(mbuf[0]) || !isdigit(mbuf[1]) || !isdigit(mbuf[2]) || mbuf[3] != ' '));
while (mbuf_len > 3 && (!isdigit((unsigned char)mbuf[0]) || !isdigit((unsigned char)mbuf[1]) || !isdigit((unsigned char)mbuf[2]) || mbuf[3] != ' '));
(void)BIO_flush(fbio);
BIO_pop(fbio);
BIO_free(fbio);
Expand Down
2 changes: 1 addition & 1 deletion crypto/LPdir_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
if ((*ctx)->expect_file_generations) {
char *p = (*ctx)->entry_name + strlen((*ctx)->entry_name);

while (p > (*ctx)->entry_name && isdigit(p[-1]))
while (p > (*ctx)->entry_name && isdigit((unsigned char)p[-1]))
p--;
if (p > (*ctx)->entry_name && p[-1] == ';')
p[-1] = '\0';
Expand Down
4 changes: 2 additions & 2 deletions engines/e_loader_attic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1470,9 +1470,9 @@ static int file_name_check(OSSL_STORE_LOADER_CTX *ctx, const char *name)
* Last, check that the rest of the extension is a decimal number, at
* least one digit long.
*/
if (!isdigit(*p))
if (!isdigit((unsigned char)*p))
return 0;
while (isdigit(*p))
while (isdigit((unsigned char)*p))
p++;

#ifdef __VMS
Expand Down
6 changes: 3 additions & 3 deletions providers/implementations/storemgmt/file_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,9 @@ static int file_name_check(struct file_ctx_st *ctx, const char *name)
* Last, check that the rest of the extension is a decimal number, at
* least one digit long.
*/
if (!isdigit(*p))
if (!isdigit((unsigned char)*p))
return 0;
while (isdigit(*p))
while (isdigit((unsigned char)*p))
p++;

#ifdef __VMS
Expand All @@ -619,7 +619,7 @@ static int file_name_check(struct file_ctx_st *ctx, const char *name)
*/
if (*p == ';')
for (p++; *p != '\0'; p++)
if (!ossl_isdigit(*p))
if (!ossl_isdigit((unsigned char)*p))
break;
#endif

Expand Down
2 changes: 1 addition & 1 deletion test/testutil/provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ int fips_provider_version_match(OSSL_LIB_CTX *libctx, const char *versions)
} else if (*p == '>') {
mode = MODE_GT;
p++;
} else if (isdigit(*p)) {
} else if (isdigit((unsigned char)*p)) {
mode = MODE_EQ;
} else {
TEST_info("Error matching FIPS version: mode %s\n", p);
Expand Down