New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$_[0]=~/str/g does not move pos and is true forever when $_[0] is tainted #11204
Comments
From Mark.Martinec@ijs.siCreated by Mark.Martinec@ijs.siThe following test case loops forever perl -Te 'sub x { while ($_[0] =~ /test/g) { printf("str=%s, pos=%s\n", $_[0], pos $_[0]) } }; x("atested".substr($0,0,0))' The same code works correctly without -T or with untainted argument of x(): $ perl -e 'sub x { while ($_[0] =~ /test/g) { printf("str=%s, pos=%s\n", $_[0], pos $_[0]) } }; $t = "atested test".$0; x($t)' Copying $_[0] to a temporary variable and letting the '= At least the following versions of perl seem to be affected: The code above has been distilled from SpamAssassin's Perl Info
|
From Mark.Martinec@ijs.siBy mistake I showed two different args in a call to x(): as a constant, |
From p5p@perl.wizbit.be
[...] This is a duplicate of Which is linked to: * #27344: pos() does not get updated when running in taint mode => Marking as resolved. Best regards, Bram |
The RT System itself - Status changed from 'new' to 'open' |
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#86784 (status was 'resolved')
Searchable as RT86784$
The text was updated successfully, but these errors were encountered: