This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad49ad3
)
When probing strxfrm, consider a consistent return value of 0 as sane
author
Nicholas Clark
<nick@ccl4.org>
Fri, 9 Sep 2011 16:15:00 +0000
(18:15 +0200)
committer
Florian Ragwitz
<rafl@debian.org>
Fri, 9 Sep 2011 16:15:00 +0000
(18:15 +0200)
locale.c
patch
|
blob
|
blame
|
history
diff --git
a/locale.c
b/locale.c
index
5893212
..
81c09ab
100644
(file)
--- a/
locale.c
+++ b/
locale.c
@@
-231,7
+231,7
@@
Perl_new_collate(pTHX_ const char *newcoll)
const Size_t fa = strxfrm(xbuf, "a", XFRMBUFSIZE);
const Size_t fb = strxfrm(xbuf, "ab", XFRMBUFSIZE);
const SSize_t mult = fb - fa;
- if (mult < 1)
+ if (mult < 1
&& !(fa == 0 && fb == 0)
)
Perl_croak(aTHX_ "panic: strxfrm() gets absurd - a => %"UVuf", ab => %"UVuf,
(UV) fa, (UV) fb);
PL_collxfrm_base = (fa > (Size_t)mult) ? (fa - mult) : 0;