Created attachment 512377 [details] proposed patch Description of problem: string repeat count > 2^31 causes heap corruption Version-Release number of selected component (if applicable): perl-5.12.4-159.fc15.x86_64 How reproducible: every time Steps to Reproduce: 1. perl -le 'print "v"x(2**31+1)' 2. 3. Actual results: segfault Expected results: 2^31+1 'v's followed by a newline on output Additional info: http://thread.gmane.org/gmane.comp.lang.perl.perl5.porters/96812 https://rt.perl.org/rt3/Ticket/Display.html?id=94560 Patch attached.
F14 (perl-5.12.3-143.fc14.x86_64) affected too.
Am I right this changes public API, thus without rebuilding all perl packages we cannot apply it?
I made a very quick test in rawhide. After applying this patch and rebuilding perl-5.14.2, I downloaded a few XS dists at random and ran their test suites against the our existing packaged version with no failures. I don't know of any modules actually using repeatcpy, nor do I have a local cpan to grep for one.
Looking through matches from here, https://codesearch.google.com/#search/&q=repeatcpy%5B%5E%7C%5D&p=1&type=cs I found only one use: Regexp-Fields-0.046/sources/regcomp-5.6.1.c 1094: SvGROW(last_str, (mincount * l) + 1); 1095: repeatcpy(SvPVX(last_str) + l, 1096: SvPVX(last_str), l, mincount - 1);
Ok, I'll commit it into all branches with your IV type which is signed as well as original I32.
Created attachment 526740 [details] Patch for Perl 5.14.2 This patch for 5.14.2 modifies embed.fnc instead of proto.h as the later one is generated from the first one (by regen.pl script in root of Perl sources). Otherwise standard test t/porting/regen.t fails.
perl-5.14.2-189.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/perl-5.14.2-189.fc16
Package perl-5.14.2-189.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing perl-5.14.2-189.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-15276 then log in and leave karma (feedback).
Package perl-5.14.2-190.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing perl-5.14.2-190.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-15276 then log in and leave karma (feedback).
perl-5.12.4-163.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/perl-5.12.4-163.fc15
perl-5.12.4-148.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/perl-5.12.4-148.fc14
perl-5.14.2-190.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
perl-5.12.4-163.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
perl-5.12.4-148.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.