summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorSlaven Rezic <slaven@rezic.de>2003-10-31 12:16:11 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-10-31 19:54:23 +0000
commit197cf9b9fa28c8b3d5afcefd42f8263ea63819b3 (patch)
tree767c2c22c0a53037a11f552341978c73664626df /regcomp.c
parenta12755f08356686e8eba9b8e518360528f66abdc (diff)
downloadperl-197cf9b9fa28c8b3d5afcefd42f8263ea63819b3.tar.gz
Off-by-one error in regcomp.c
Message-Id: <1067602571.12768@devpc01.iconmobile.de> p4raw-id: //depot/perl@21591
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index ded3c633ae..6293ade0e2 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -5045,7 +5045,7 @@ S_re_croak2(pTHX_ const char* pat1,const char* pat2,...)
if (l1 > 512)
l1 = 512;
Copy(message, buf, l1 , char);
- buf[l1] = '\0'; /* Overwrite \n */
+ buf[l1-1] = '\0'; /* Overwrite \n */
Perl_croak(aTHX_ "%s", buf);
}