mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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.
			
			
This commit is contained in:
		@@ -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')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user