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:
8b877d2
)
warn if PERL_HASH_SEED contains an unexpected character
author
Yves Orton
<demerphq@gmail.com>
Fri, 14 Dec 2012 20:44:07 +0000
(21:44 +0100)
committer
Yves Orton
<demerphq@gmail.com>
Fri, 14 Dec 2012 20:44:07 +0000
(21:44 +0100)
util.c
patch
|
blob
|
blame
|
history
diff --git
a/util.c
b/util.c
index
e42dd01
..
fea95b9
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-5668,6
+5668,8
@@
Perl_get_hash_seed(pTHX_ unsigned char *seed_buffer)
{
while (isSPACE(*s))
s++;
+ if (s[0] == '0' && s[1] == 'x')
+ s += 2;
while (isXDIGIT(*s) && seed_buffer < end) {
*seed_buffer = READ_XDIGIT(s) << 4;
@@
-5676,6
+5678,11
@@
Perl_get_hash_seed(pTHX_ unsigned char *seed_buffer)
}
seed_buffer++;
}
+ while (isSPACE(*s))
+ s++;
+ if (*s && !isXDIGIT(*s)) {
+ warn_nocontext("perl: Non hex character in '$ENV{PERL_HASH_SEED}', seed only partially set\n");
+ }
/* should we check for unparsed crap? */
}
else