From fd7794d7de6a481fc3086fe496c95476fd473ee2 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 21 Jan 2019 21:14:36 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12596 --- MagickCore/locale.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/MagickCore/locale.c b/MagickCore/locale.c index f9f4b52c0..ad7c35562 100644 --- a/MagickCore/locale.c +++ b/MagickCore/locale.c @@ -1526,13 +1526,9 @@ MagickExport void LocaleLower(char *string) */ MagickExport int LocaleLowercase(const int c) { - locale_t - locale; - - locale=AcquireCLocale(); - if (locale == (locale_t) NULL) + if (c_locale == (locale_t) NULL) return(tolower(c)); - return(tolower_l(c,locale)); + return(tolower_l(c,c_locale)); } /* @@ -1666,13 +1662,9 @@ MagickExport void LocaleUpper(char *string) */ MagickExport int LocaleUppercase(const int c) { - locale_t - locale; - - locale=AcquireCLocale(); - if (locale == (locale_t) NULL) + if (c_locale == (locale_t) NULL) return(toupper(c)); - return(toupper_l(c,locale)); + return(toupper_l(c,c_locale)); } /* -- 2.40.0