mirror of
https://github.com/postgres/postgres.git
synced 2025-10-18 04:29:09 +03:00
Make sure that all <ctype.h> routines are called with unsigned char
values; it's not portable to call them with signed chars. I recall doing this for the last release, but a few more uncasted calls have snuck in.
This commit is contained in:
@@ -1092,7 +1092,7 @@ CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi)
|
||||
|
||||
ReadyToReturn = FALSE;
|
||||
empty_reqs = 0;
|
||||
for (wq = query; isspace(*wq); wq++)
|
||||
for (wq = query; isspace((unsigned char) *wq); wq++)
|
||||
;
|
||||
if (*wq == '\0')
|
||||
empty_reqs = 1;
|
||||
|
@@ -193,7 +193,7 @@ timestamp2stime(const char *str, SIMPLE_TIME *st, BOOL *bZone, int *zone)
|
||||
}
|
||||
for (i = 1; i < 10; i++)
|
||||
{
|
||||
if (!isdigit(rest[i]))
|
||||
if (!isdigit((unsigned char) rest[i]))
|
||||
break;
|
||||
}
|
||||
for (; i < 10; i++)
|
||||
@@ -1351,7 +1351,7 @@ copy_statement_with_parameters(StatementClass *stmt)
|
||||
while (isspace((unsigned char) old_statement[++opos]));
|
||||
}
|
||||
if (strnicmp(&old_statement[opos], "call", lit_call_len) ||
|
||||
!isspace(old_statement[opos + lit_call_len]))
|
||||
!isspace((unsigned char) old_statement[opos + lit_call_len]))
|
||||
{
|
||||
opos--;
|
||||
continue;
|
||||
@@ -1407,7 +1407,7 @@ copy_statement_with_parameters(StatementClass *stmt)
|
||||
in_dquote = TRUE;
|
||||
else
|
||||
{
|
||||
if (isspace(oldchar))
|
||||
if (isspace((unsigned char) oldchar))
|
||||
{
|
||||
if (!prev_token_end)
|
||||
{
|
||||
|
Reference in New Issue
Block a user