artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68e76ea
)
Fix possible segmentation fault in Perl 5.38.2.
author
bluhm
<bluhm@openbsd.org>
Fri, 17 May 2024 18:11:58 +0000
(18:11 +0000)
committer
bluhm
<bluhm@openbsd.org>
Fri, 17 May 2024 18:11:58 +0000
(18:11 +0000)
When calling POSIX::setlocale() with unknown locale category, Perl
could crash due to NULL dereference.
found by sthen@ in smokeping build; OK afresh1@
gnu/usr.bin/perl/locale.c
patch
|
blob
|
history
diff --git
a/gnu/usr.bin/perl/locale.c
b/gnu/usr.bin/perl/locale.c
index
92b6c1a
..
59c79b0
100644
(file)
--- a/
gnu/usr.bin/perl/locale.c
+++ b/
gnu/usr.bin/perl/locale.c
@@
-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
* being changed, so do nothing. */
- if ( strEQ(retval, locale)
+ if (
retval != NULL &&
strEQ(retval, locale)
&& ( ! affects_LC_NUMERIC(category)
# ifdef USE_LOCALE_NUMERIC