Consistently pass an "unsigned char" to ctype.h functions.
Noah Misch <noah@leadboat.com>
Consistently pass an "unsigned char" to ctype.h functions. The isxdigit() calls relied on undefined behavior. The isascii() call was well-defined, but our prevailing style is to include the cast. Back-patch to 9.4, where the isxdigit() calls were introduced.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_upgrade/controldata.c | modified | +1 −1 |
| src/backend/utils/adt/json.c | modified | +5 −2 |