Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Staging:C
perl-Capture-Tiny
Capture-Tiny-0.2.3-CVE-2014-1875.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Capture-Tiny-0.2.3-CVE-2014-1875.patch of Package perl-Capture-Tiny
Index: lib/Capture/Tiny.pm =================================================================== --- lib/Capture/Tiny.pm.orig +++ lib/Capture/Tiny.pm @@ -63,12 +63,18 @@ our $TIMEOUT = 30; # This is annoying, but seems to be the best that can be done # as a simple, portable IPC technique #--------------------------------------------------------------------------# -my @cmd = ($^X, '-C0', '-e', '$SIG{HUP}=sub{exit}; ' - . 'if( my $fn=shift ){ open my $fh, qq{>$fn}; print {$fh} $$; close $fh;} ' - . 'my $buf; while (sysread(STDIN, $buf, 2048)) { ' - . 'syswrite(STDOUT, $buf); syswrite(STDERR, $buf)}' -); - +my @cmd = ($^X, '-C0', '-e', <<'HERE'); +use Fcntl; +$SIG{HUP}=sub{exit}; +if ( my $fn=shift ) { + sysopen(my $fh, qq{$fn}, O_WRONLY|O_CREAT|O_EXCL) or die $!; + print {$fh} $$; + close $fh; +} +my $buf; while (sysread(STDIN, $buf, 2048)) { + syswrite(STDOUT, $buf); syswrite(STDERR, $buf); +} +HERE #--------------------------------------------------------------------------# # filehandle manipulation #--------------------------------------------------------------------------#
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor