Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
ksh.3336
ksh93-redirectleak.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ksh93-redirectleak.dif of Package ksh.3336
--- src/cmd/ksh93/sh/io.c.orig 2015-12-09 11:18:00.657295950 +0000 +++ src/cmd/ksh93/sh/io.c 2015-12-09 11:18:57.719080685 +0000 @@ -1541,7 +1541,17 @@ int sh_redirect(Shell_t *shp,struct iono sh_iosave(shp,fn,indx,tname?fname:(trunc?Empty:0)); } else if(sh_subsavefd(fn)) + { + if(fd==fn) + { + if((r=sh_fcntl(fd,F_DUPFD,10)) > 0) + { + fd = r; + sh_close(fn); + } + } sh_iosave(shp,fn,indx|IOSUBSHELL,tname?fname:0); + } } if(fd<0) {
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