summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorLarry Wall <lwall@scalpel.netlabs.com>1995-11-21 10:01:00 +1200
committerLarry <lwall@scalpel.netlabs.com>1995-11-21 10:01:00 +1200
commit4633a7c4bad06b471d9310620b7fe8ddd158cccd (patch)
tree37ebeb26a64f123784fd8fac6243b124767243b0 /doop.c
parent8e07c86ebc651fe92eb7e3b25f801f57cfb8dd6f (diff)
downloadperl-4633a7c4bad06b471d9310620b7fe8ddd158cccd.tar.gz
5.002 beta 1
If you're adventurous, have a look at ftp://ftp.sems.com/pub/outgoing/perl5.0/perl5.002beta1.tar.gz Many thanks to Andy for doing the integration. Obviously, if you consult the bugs database, you'll note there are still plenty of buglets that need fixing, and several enhancements that I've intended to put in still haven't made it in (Hi, Tim and Ilya). But I think it'll be pretty stable. And you can start to fiddle around with prototypes (which are, of course, still totally undocumented). Packrats, don't worry too much about readvertising this widely. Nowadays we're on a T1 here, so our bandwidth is okay. Have the appropriate amount of jollity. Larry
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/doop.c b/doop.c
index b18972469a..d8615995c4 100644
--- a/doop.c
+++ b/doop.c
@@ -319,6 +319,10 @@ register SV **sarg;
}
/* end of switch, copy results */
*t = ch;
+ if (xs == buf && xlen >= sizeof(buf)) { /* Ooops! */
+ fputs("panic: sprintf overflow - memory corrupted!\n",stderr);
+ my_exit(1);
+ }
SvGROW(sv, SvCUR(sv) + (f - s) + xlen + 1 + pre + post);
sv_catpvn(sv, s, f - s);
if (pre) {
@@ -530,7 +534,6 @@ SV *right;
(void)memzero(dc + SvCUR(sv), len - SvCUR(sv) + 1);
}
SvCUR_set(sv, len);
- *SvEND(sv) = '\0';
(void)SvPOK_only(sv);
#ifdef LIBERAL
if (len >= sizeof(long)*4 &&
@@ -600,6 +603,8 @@ SV *right;
sv_catpvn(sv, rsave + len, rightlen - len);
else if (leftlen > len)
sv_catpvn(sv, lsave + len, leftlen - len);
+ else
+ *SvEND(sv) = '\0';
break;
}
}