mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix bugs in plpgsql and ecpg caused by assuming that isspace() would only
return true for exactly the characters treated as whitespace by their flex scanners. Per report from Victor Snezhko and subsequent investigation. Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde char-vs-unsigned-char issue. I won't miss <ctype.h> when we are finally able to stop using it.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This is a port of the Double Metaphone algorithm for use in PostgreSQL.
|
||||
*
|
||||
* $PostgreSQL: pgsql/contrib/fuzzystrmatch/dmetaphone.c,v 1.9 2006/07/16 02:44:00 tgl Exp $
|
||||
* $PostgreSQL: pgsql/contrib/fuzzystrmatch/dmetaphone.c,v 1.10 2006/09/22 21:39:56 tgl Exp $
|
||||
*
|
||||
* Double Metaphone computes 2 "sounds like" strings - a primary and an
|
||||
* alternate. In most cases they are the same, but for foreign names
|
||||
@ -318,7 +318,7 @@ MakeUpper(metastring * s)
|
||||
char *i;
|
||||
|
||||
for (i = s->str; *i; i++)
|
||||
*i = toupper(*i);
|
||||
*i = toupper((unsigned char) *i);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user