diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2018-09-27 21:11:21 +0200 |
---|---|---|
committer | Tim Rühsen <tim.ruehsen@gmx.de> | 2018-09-27 21:15:58 +0200 |
commit | 65f0988f74fa4a6c2ff474f0b63ea928c1cde929 (patch) | |
tree | 41bd236c96ac482e2a60e455248678c61cb84e16 /lib/compress.c | |
parent | c9c4523eaddbfd8e7fb7855e31de4f1d88ec1c06 (diff) | |
download | gnutls-tmp-lib-c-strcase.tar.gz |
Use ASCII version of strcasecmp() in library codetmp-lib-c-strcase
strcasecmp() has side effects in some locales.
What we really need is c_strcasecmp() from Gnulib for comparing
ASCII strings.
Fixes #570
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
Diffstat (limited to 'lib/compress.c')
-rw-r--r-- | lib/compress.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compress.c b/lib/compress.c index a24c7c878f..e510df11b9 100644 --- a/lib/compress.c +++ b/lib/compress.c @@ -21,6 +21,7 @@ */ #include "gnutls_int.h" +#include "c-strcase.h" /* Compatibility compression functions */ @@ -53,7 +54,7 @@ const char *gnutls_compression_get_name(gnutls_compression_method_t **/ gnutls_compression_method_t gnutls_compression_get_id(const char *name) { - if (strcasecmp(name, "NULL") == 0) + if (c_strcasecmp(name, "NULL") == 0) return GNUTLS_COMP_NULL; return GNUTLS_COMP_UNKNOWN; @@ -62,7 +63,7 @@ gnutls_compression_method_t gnutls_compression_get_id(const char *name) /** * gnutls_compression_list: * - * Get a list of compression methods. + * Get a list of compression methods. * * Returns: a zero-terminated list of #gnutls_compression_method_t * integers indicating the available compression methods. |