[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strangeness in w32/subproc/sub_proc.c

From: Gisle Vanem
Subject: Strangeness in w32/subproc/sub_proc.c
Date: Thu, 5 Nov 2015 14:08:14 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Some lines in this file seems a bit strange.
Line 755:

 if (arr2envblk(envp, &envblk, &envsize_needed) == FALSE) {
            pproc->last_err = 0;  << !!
            pproc->lerrno = E_NO_MEM;
            free( command_line );
            if (pproc->last_err == ERROR_INVALID_PARAMETER
               && envsize_needed > 32*1024) {

With the above, the 'if (pproc->last_err ..' test will never
be hit. So the "pproc->last_err = 0" should be put after
the warning. Patch attached.

PS. The test on ERROR_MORE_DATA is important too IMHO.


Attachment: sub_proc.diff
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]