[PATCH] httpd: don't drop QUERY_STRING when /cgi-bin/index.cgi is used
Peter Korsgaard
jacmet at sunsite.dk
Thu Dec 15 16:18:33 UTC 2011
>>>>> "Paulius" == Paulius Zaleckas <paulius.zaleckas at gmail.com> writes:
Hi,
>> +#if ENABLE_FEATURE_HTTPD_CGI
>> + /* tptr gets overwritten by index_page, so do deep copy
>> + for /cgi-bin/index.cgi */
>> + g_query = alloca(strlen(tptr) + 1);
>> + strcpy((char *)g_query, tptr);
Paulius> Why not use strdup() instead?
Because we then need to cleanup. We're already using alloca for urlcopy
just above.
--
Bye, Peter Korsgaard
More information about the busybox
mailing list