delorie.com/archives/browse.cgi | search |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |