Skip to content

Commit 1a93c25

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 0a13f19 commit 1a93c25

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
@@ -59,7 +59,7 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa
5959
/* skip invalid characters */
6060
do {
6161
(*scan_length)++;
62-
} while (isdigit(**scan_length));
62+
} while (isdigit((unsigned char) **scan_length));
6363
}
6464

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

0 commit comments

Comments
 (0)