Skip to content

Commit d1f9ac5

Browse files
committed
Fix unportable usage of <ctype.h> functions.
isdigit(), isspace(), etc are likely to give surprising results if passed a signed char. We should always cast the argument to unsigned char to avoid that. Error in commit 63d6b97, found by buildfarm member gaur. Back-patch to 9.3, like that commit.
1 parent 4b0d28d commit d1f9ac5

File tree

1 file changed

+1
-1
lines changed
  • src/interfaces/ecpg/ecpglib

1 file changed

+1
-1
lines changed

src/interfaces/ecpg/ecpglib/data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa
5757
/* skip invalid characters */
5858
do {
5959
(*scan_length)++;
60-
} while (isdigit(**scan_length));
60+
} while (isdigit((unsigned char) **scan_length));
6161
}
6262

6363
if (**scan_length != ' ' && **scan_length != '\0')

0 commit comments

Comments
 (0)