Commit d1f9ac5b authored by Tom Lane's avatar Tom Lane

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 63d6b97f, found by buildfarm member gaur.
Back-patch to 9.3, like that commit.
parent 4b0d28de
...@@ -57,7 +57,7 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa ...@@ -57,7 +57,7 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa
/* skip invalid characters */ /* skip invalid characters */
do { do {
(*scan_length)++; (*scan_length)++;
} while (isdigit(**scan_length)); } while (isdigit((unsigned char) **scan_length));
} }
if (**scan_length != ' ' && **scan_length != '\0') if (**scan_length != ' ' && **scan_length != '\0')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment