projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05bb32d
)
[perl #82772] utf8::decode: Don’t read past SvCUR
author
Father Chrysostomos
<sprout@cpan.org>
Fri, 20 Jan 2012 21:29:38 +0000
(13:29 -0800)
committer
Father Chrysostomos
<sprout@cpan.org>
Fri, 20 Jan 2012 22:49:09 +0000
(14:49 -0800)
sv.c
patch
|
blob
|
history
diff --git
a/sv.c
b/sv.c
index
d116996
..
6e8ed66
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-3562,7
+3562,7
@@
Perl_sv_utf8_decode(pTHX_ register SV *const sv)
* we want to make sure everything inside is valid utf8 first.
*/
c = start = (const U8 *) SvPVX_const(sv);
- if (!is_utf8_string(c, SvCUR(sv)
+1
))
+ if (!is_utf8_string(c, SvCUR(sv)))
return FALSE;
e = (const U8 *) SvEND(sv);
while (c < e) {