diff options
author | Tom Lane | 2017-11-07 18:49:36 +0000 |
---|---|---|
committer | Tom Lane | 2017-11-07 18:50:03 +0000 |
commit | 7a15fe5a2240244e2f80f25adfe6b9a34787a021 (patch) | |
tree | 85446cff192550fb1263e6dbb9e354ebe53b4224 | |
parent | de7dabfd35e8f657af9a54cb0ff3171e1cf8e957 (diff) |
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 63d6b97fd, found by buildfarm member gaur.
Back-patch to 9.3, like that commit.
-rw-r--r-- | src/interfaces/ecpg/ecpglib/data.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 60c94c8d582..230d7c6bcb8 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -59,7 +59,7 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa /* skip invalid characters */ do { (*scan_length)++; - } while (isdigit(**scan_length)); + } while (isdigit((unsigned char) **scan_length)); } if (**scan_length != ' ' && **scan_length != '\0') |