mirror of
https://github.com/openbsd/src.git
synced 2025-01-03 06:45:37 -08:00
Fix possible segmentation fault in Perl 5.38.2.
When calling POSIX::setlocale() with unknown locale category, Perl could crash due to NULL dereference. found by sthen@ in smokeping build; OK afresh1@
This commit is contained in:
parent
68e76eaff5
commit
d635388b71
@ -2858,7 +2858,7 @@ Perl_setlocale(const int category, const char * locale)
|
|||||||
|
|
||||||
/* If the new locale is the same as the current one, nothing is actually
|
/* If the new locale is the same as the current one, nothing is actually
|
||||||
* being changed, so do nothing. */
|
* being changed, so do nothing. */
|
||||||
if ( strEQ(retval, locale)
|
if ( retval != NULL && strEQ(retval, locale)
|
||||||
&& ( ! affects_LC_NUMERIC(category)
|
&& ( ! affects_LC_NUMERIC(category)
|
||||||
|
|
||||||
# ifdef USE_LOCALE_NUMERIC
|
# ifdef USE_LOCALE_NUMERIC
|
||||||
|
Loading…
Reference in New Issue
Block a user