diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-05-05 22:17:28 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-05-05 22:17:28 +0200 |
commit | 12c03890ea08be56536c1c8ea70b19d8a8137564 (patch) | |
tree | 5878c6600958527893ebae8fd3cbc2b0e90cd50a /lib/opencdk | |
parent | 810d77cf5530bcefd48030b2982b5c0393026c88 (diff) | |
download | gnutls-12c03890ea08be56536c1c8ea70b19d8a8137564.tar.gz |
Use c_toupper to avoid converting characters non in the english ASCII set. Reported by Kalle Olavi Niemitalo.
Diffstat (limited to 'lib/opencdk')
-rw-r--r-- | lib/opencdk/misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/opencdk/misc.c b/lib/opencdk/misc.c index d6a89aeb86..d00aa95372 100644 --- a/lib/opencdk/misc.c +++ b/lib/opencdk/misc.c @@ -29,6 +29,7 @@ #include <string.h> #include <ctype.h> #include <sys/stat.h> +#include <c-ctype.h> #include "opencdk.h" #include "main.h" @@ -113,10 +114,10 @@ _cdk_memistr (const char *buf, size_t buflen, const char *sub) for (t = (byte *) buf, n = buflen, s = (byte *) sub; n; t++, n--) { - if (toupper (*t) == toupper (*s)) + if (c_toupper (*t) == c_toupper (*s)) { for (buf = t++, buflen = n--, s++; - n && toupper (*t) == toupper ((byte) * s); t++, s++, n--) + n && c_toupper (*t) == c_toupper ((byte) * s); t++, s++, n--) ; if (!*s) return buf; |