diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-04-26 17:30:31 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-04-26 17:30:31 +0000 |
commit | 06bf62c76633176572262d33d1b4072ea6d227a8 (patch) | |
tree | 232c71c6f4b5a6c96c0bd8b59c078c83e60dff79 /regcomp.c | |
parent | cc391245e1d1990aad64067bd4c25ba76be67238 (diff) | |
download | perl-06bf62c76633176572262d33d1b4072ea6d227a8.tar.gz |
allow embedded null characters in diagnostics
p4raw-id: //depot/perl@3274
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |