summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-04-26 17:30:31 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-04-26 17:30:31 +0000
commit06bf62c76633176572262d33d1b4072ea6d227a8 (patch)
tree232c71c6f4b5a6c96c0bd8b59c078c83e60dff79 /regcomp.c
parentcc391245e1d1990aad64067bd4c25ba76be67238 (diff)
downloadperl-06bf62c76633176572262d33d1b4072ea6d227a8.tar.gz
allow embedded null characters in diagnostics
p4raw-id: //depot/perl@3274
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index d8a62daee4..2755d61ba3 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3192,6 +3192,7 @@ re_croak2(const char* pat1,const char* pat2,...)
STRLEN l1 = strlen(pat1);
STRLEN l2 = strlen(pat2);
char buf[512];
+ SV *msv;
char *message;
if (l1 > 510)
@@ -3203,9 +3204,9 @@ re_croak2(const char* pat1,const char* pat2,...)
buf[l1 + l2] = '\n';
buf[l1 + l2 + 1] = '\0';
va_start(args, pat2);
- message = mess(buf, &args);
+ msv = mess(buf, &args);
va_end(args);
- l1 = strlen(message);
+ message = SvPV(msv,l1);
if (l1 > 512)
l1 = 512;
Copy(message, buf, l1 , char);