From 2b104f6438ab604cd21b1b927ffa112fa917d7cb Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Fri, 1 Oct 2004 09:57:56 +0000 Subject: [PATCH] * libltdl/ltdl.c (load_deplibs, try_dlopen): Cast argument to isspace/isalnum to the correct range. Also, cast to int to avoid compiler warnings. --- ChangeLog | 6 ++++++ libltdl/ltdl.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3270dc4d..a2cae5bc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-10-01 Ralf Wildenhues + + * libltdl/ltdl.c (load_deplibs, try_dlopen): Cast argument + to isspace/isalnum to the correct range. Also, cast to int to + avoid compiler warnings. + 2004-09-30 Ralf Wildenhues * libltdl/ltdl.c (try_dlopen): Fix null pointer dereference in diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 5c2bc9b61..d0316928e 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -737,10 +737,10 @@ load_deplibs (lt_dlhandle handle, char *deplibs) p = deplibs; while (*p) { - if (!isspace ((int) *p)) + if (!isspace ((int)(unsigned char) *p)) { char *end = p+1; - while (*end && !isspace((int) *end)) + while (*end && !isspace((int)(unsigned char) *end)) { ++end; } @@ -786,14 +786,14 @@ load_deplibs (lt_dlhandle handle, char *deplibs) p = deplibs; while (*p) { - if (isspace ((int) *p)) + if (isspace ((int)(unsigned char) *p)) { ++p; } else { char *end = p+1; - while (*end && !isspace ((int) *end)) + while (*end && !isspace ((int)(unsigned char) *end)) { ++end; } @@ -1004,7 +1004,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename) int i; for (i = 0; i < ext - base_name; ++i) { - if (isalnum ((int)(base_name[i]))) + if (isalnum ((int)(unsigned char)(base_name[i]))) { name[i] = base_name[i]; } -- 2.47.2