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:
003d2c6
)
assert() that the pointer passed to Perl_sv_chop() lies within the
author
Nicholas Clark
<nick@ccl4.org>
Sun, 13 Jul 2008 04:04:31 +0000
(
04:04
+0000)
committer
Nicholas Clark
<nick@ccl4.org>
Sun, 13 Jul 2008 04:04:31 +0000
(
04:04
+0000)
buffer of the SV.
p4raw-id: //depot/perl@34136
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
6ac3408
..
cdae779
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-4401,6
+4401,10
@@
Perl_sv_chop(pTHX_ register SV *const sv, register const char *const ptr)
}
assert(ptr > SvPVX_const(sv));
SV_CHECK_THINKFIRST(sv);
+ if (SvLEN(sv))
+ assert(delta <= SvLEN(sv));
+ else
+ assert(delta <= SvCUR(sv));
if (!SvOOK(sv)) {
if (!SvLEN(sv)) { /* make copy of shared string */