Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
devel
>
perl
> perl-5.8.8-U27605.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File perl-5.8.8-U27605.patch of Package perl
--- perl-5.8.8/mg.c.U27605 2006-01-27 15:23:21.000000000 -0500 +++ perl-5.8.8/mg.c 2006-06-01 19:37:17.000000000 -0400 @@ -2520,10 +2520,10 @@ #endif /* PL_origalen is set in perl_parse(). */ s = SvPV_force(sv,len); - if (len >= (STRLEN)PL_origalen) { - /* Longer than original, will be truncated. */ - Copy(s, PL_origargv[0], PL_origalen, char); - PL_origargv[0][PL_origalen - 1] = 0; + if (len >= (STRLEN)PL_origalen-1) { + /* Longer than original, will be truncated. We assume that + * PL_origalen bytes are available. */ + Copy(s, PL_origargv[0], PL_origalen-1, char); } else { /* Shorter than original, will be padded. */ @@ -2536,9 +2536,10 @@ * --jhi */ (int)' ', PL_origalen - len - 1); - for (i = 1; i < PL_origargc; i++) - PL_origargv[i] = 0; } + PL_origargv[0][PL_origalen-1] = 0; + for (i = 1; i < PL_origargc; i++) + PL_origargv[i] = 0; UNLOCK_DOLLARZERO_MUTEX; break; #endif --- perl-5.8.8/perl.c.U27605 2006-06-01 19:00:57.000000000 -0400 +++ perl-5.8.8/perl.c 2006-06-01 19:37:17.000000000 -0400 @@ -1561,7 +1561,7 @@ } } } - PL_origalen = s - PL_origargv[0]; + PL_origalen = s - PL_origargv[0] + 1; } if (PL_do_undump) {