delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
Date: | Tue, 7 Dec 2004 10:48:11 -0500 |
Message-Id: | <200412071548.iB7FmBY0001370@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | djgpp-workers AT delorie DOT com |
In-reply-to: | <Pine.OSF.4.58.0412071254320.19658@sirppi.helsinki.fi> (message |
from Esa A E Peuha on Tue, 7 Dec 2004 13:02:04 +0200 (EET)) | |
Subject: | Re: A fix for popen() |
References: | <q1h2r0dl6evues7nrvo6r9g5j6dv2u57sm AT 4ax DOT com> (message from Brian |
Inglis on Fri, 03 Dec 2004 22:02:18 -0700) <41B48A8B DOT 18253 DOT 35A9BAD AT localhost> <Pine DOT OSF DOT 4 DOT 58 DOT 0412071254320 DOT 19658 AT sirppi DOT helsinki DOT fi> | |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
While your patch will fix that problem, setting l1->command to NULL fixes that problem *and* the other problems, so it is a better patch. No reason why we can't have both patches (unless we later change something in popen/pclose that sets l1->command for other reasons), but l1->command still needs to be initialized. Personally, I prefer a more paranoid approach - if command is set, even if we don't expect it to be, it needs to be freed.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |