Change 34900 by [EMAIL PROTECTED] on 2008/11/21 21:41:58
Integrate:
[ 34876]
S_save_lines() was using strchr() when it should have been using
memchr(). Result - eval""ed source with embedded NULs was not split
correctly into lines for the debugger. Obscure. But still a bug.
Maybe the Campaign for the Elimination of strlen() needs to take a long
hard stare at every strchr() too. And strmp() while we're looking.
[and grrr to perforce, which won't let me merge in add at #1, and edit
at #3, without edit at #3]
Affected files ...
... //depot/maint-5.10/perl/pp_ctl.c#27 integrate
Differences ...
==== //depot/maint-5.10/perl/pp_ctl.c#27 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#26~34898~ 2008-11-21 02:22:59.000000000 -0800
+++ perl/pp_ctl.c 2008-11-21 13:41:58.000000000 -0800
@@ -2703,7 +2703,7 @@
const char *t;
SV * const tmpstr = newSV_type(SVt_PVMG);
- t = strchr(s, '\n');
+ t = (const char *)memchr(s, '\n', send - s);
if (t)
t++;
else
End of Patch.