Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a149d8b

Browse files
committed
Fix unportable usage of isspace().
Must cast char argument to unsigned to avoid doing the wrong thing with high-bit-set characters. Oversight in commit 30b5ede.
1 parent c9fc28a commit a149d8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ escapeConnectionParameter(const char *src)
11341134

11351135
for (p = src; *p; p++)
11361136
{
1137-
if (isspace(*p))
1137+
if (isspace((unsigned char) *p))
11381138
{
11391139
need_quotes = true;
11401140
break;

0 commit comments

Comments
 (0)