forked from Lainports/freebsd-ports
PR: 52098
Submitted by: Jim Geovedi <jim@corebsd.or.id> close temp file privledge problem in security/fuzz.
This commit is contained in:
parent
62a2ff9409
commit
a01ac766fb
2 changed files with 21 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= fuzz
|
||||
PORTVERSION= 0.6
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= fuzz
|
||||
|
|
|
|||
20
security/fuzz/files/patch-fuzz.c
Normal file
20
security/fuzz/files/patch-fuzz.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- fuzz.c.orig Mon May 12 01:49:39 2003
|
||||
+++ fuzz.c Mon May 12 01:53:44 2003
|
||||
@@ -387,10 +387,16 @@
|
||||
int progpipe[2],status;
|
||||
char sendnewline=0;
|
||||
unsigned long curchar=0,linelen=0;
|
||||
+ int fd;
|
||||
|
||||
// finish setting up files
|
||||
if(!execute_filename){
|
||||
- snprintf(outfilename,MAXPATH,"/tmp%s.%lu",strrchr(progname,'/'),runs);
|
||||
+ snprintf(outfilename,MAXPATH,"/tmp%s.%lu.XXXXXX",strrchr(progname,'/'),runs);
|
||||
+ if ((fd=mkstemp(outfilename)) < 0) {
|
||||
+ perror("Unable to create temporary file");
|
||||
+ abort();
|
||||
+ }
|
||||
+ close(fd);
|
||||
if((outfile=fopen(outfilename,"w"))==NULL){
|
||||
fprintf(stderr,"Can't fopen outfile.\n");
|
||||
abort();
|
||||
Loading…
Add table
Reference in a new issue