summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-11-07 13:49:36 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-11-07 13:49:50 -0500
commite836502d64ba7fc936d8c273125e4ac298773e76 (patch)
treec83440126f3eef1111b04aea7407d66f24b7d613 /src
parent958fe549884928cd3bdf009993e9a05df5fd6cee (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.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ecpglib/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
index 090d60277f3..5159c619bbe 100644
--- a/src/interfaces/ecpg/ecpglib/data.c
+++ b/src/interfaces/ecpg/ecpglib/data.c
@@ -57,7 +57,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')