[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-bugs
Subject:    Re: bin/49096: cron(8) may segfault when system open file table is
From:       Dmitry Sivachenko <mitya () cavia ! pp ! ru>
Date:       2003-04-30 14:50:22
[Download RAW message or body]

The following reply was made to PR bin/49096; it has been noted by GNATS.

From: Dmitry Sivachenko <mitya@cavia.pp.ru>
To: freebsd-gnats-submit@FreeBSD.org
Cc: eugen@grosbein.pp.ru
Subject: Re: bin/49096: cron(8) may segfault when system open file table is full
Date: Wed, 30 Apr 2003 18:45:33 +0400

 Does the following patch fix the problem?
 
 
 --- do_command.c.orig	Fri May  4 04:59:40 2001
 +++ do_command.c	Wed Apr 30 18:41:48 2003
 @@ -369,13 +369,14 @@ child_process(e, u)
  
  	/*local*/{
  		register FILE	*in = fdopen(stdout_pipe[READ_PIPE], "r");
 -		register int	ch = getc(in);
 +		register int	ch;
  
  		if (in == NULL) {
  			warn("fdopen failed in child");
  			_exit(ERROR_EXIT);
  		}
  
 +		ch = getc(in);
  		if (ch != EOF) {
  			register FILE	*mail;
  			register int	bytes = 1;
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic