mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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.
This commit is contained in:
@ -154,7 +154,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
|
||||
if (GET_MAJOR_VERSION(cluster->major_version) <= 803)
|
||||
{
|
||||
for (p = bufin; *p; p++)
|
||||
if (!isascii(*p))
|
||||
if (!isascii((unsigned char) *p))
|
||||
pg_fatal("The 8.3 cluster's pg_controldata is incapable of outputting ASCII, even\n"
|
||||
"with LANG=C. You must upgrade this cluster to a newer version of PostgreSQL\n"
|
||||
"8.3 to fix this bug. PostgreSQL 8.3.7 and later are known to work properly.\n");
|
||||
|
Reference in New Issue
Block a user