X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com Subject: Re: gcc-7.1.0 To: djgpp-workers AT delorie DOT com References: <6953e282-24aa-2b4e-2141-385d8b443111 AT iki DOT fi> <590A6154 DOT 8010308 AT gmx DOT de> <83a86shf9d DOT fsf AT gnu DOT org> <590BA4E2 DOT 4000406 AT gmx DOT de> <49ae1668-e108-5e0b-350c-533d29574dba AT iki DOT fi> <590CB802 DOT 6000903 AT gmx DOT de> From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp-workers AT delorie DOT com]" Message-ID: <6790c606-db79-df1b-1a53-b8db474f13b0@iki.fi> Date: Sun, 7 May 2017 19:56:49 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <590CB802.6000903@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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 05/05/2017 08:36 PM, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp-workers AT delorie DOT com] wrote: > > > The changes are OK for me but I do not understand at all why you are assuming that an allocation > of 34 bytes for proxy_cmdline shall be sufficient. It shall contain __PROXY and this string > is supposed to have a size of __PROXY_LEN bytes. Or am I missing something? That the compiler > does not complain may not imply that it is capable to really calculate the correct length. > Neither less, please feel free to fix it as you prefer. I agree that the implemented fix shall > make minimal changes. It anyway may override end of string by absolute address. if (!found_si) proxy_cmdline[22] = 0; /* remove stubinfo information */ That should also be fixed if one would use __PROXY_LEN__ in slloca. One could also use snprintf and check the result. This code is perhaps from time before snprintf was added. Currently committed patch without changes Andris