X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Fri, 03 Dec 2004 22:02:18 -0700 From: Brian Inglis Subject: Re: A fix for popen() In-reply-to: <200412031828.iB3ISGdS009062@envy.delorie.com> To: djgpp-workers AT delorie DOT com Message-id: Organization: Systematic Software MIME-version: 1.0 X-Mailer: Forte Agent 1.93/32.576 English (American) Content-type: text/plain; charset=us-ascii References: <41B08090 DOT 14778 DOT 306B324 AT localhost> <200412031828 DOT iB3ISGdS009062 AT envy DOT delorie DOT com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id iB452LSK013224 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 Precedence: bulk On Fri, 03 Dec 2004 13:28:16 -0500, DJ Delorie wrote: > >Under what conditions would l1->command be nonzero but not allocated >memory? I think the logic is correct where you marked it, but >something else is wrong to set them incorrectly. JMG's post of 11-28 <41AADB99 DOT 14622 DOT 194D345 AT localhost> showed the issue and a possible patch: the struct is malloc()ed and gets previously used memory; the ptrs in the struct are not NULLed after allocation; the ptrs are later free()d without going through a code path that sets them.