httpd: memory hole in function addEnv() and more

Dirk Clemens develop at cle-mens.de
Mon Sep 5 10:01:14 UTC 2005


Vladimir N. Oleynik wrote:

>
>
> No.
> Compare size:
>
> setenv("SERVER_SOFTWARE", httpdVersion,1);
> setenv("SERVER_PROTOCOL", "HTTP/1.0" ,1);
> setenv("SERVER_PORT", server_port, 1);
> setenv("REMOTE_PORT", remote_port, 1);
> setenv("REMOTE_USER", remote_user, 1);
> etc
>
> with:
>
> addEnv("SERVER",         "SOFTWARE", httpdVersion);
> addEnv("SERVER",         "PROTOCOL", HTTP/1.0);
> addEnvPort("SERVER");
> addEnvPort("REMOTE");
> addEnv("REMOTE",         "USER", remote_user);
> etc
>
> (all good C compiler produce string "SERVER" and "REMOTE" one only)


Now I understand the reason for two name parts. :)

Dirk





More information about the busybox mailing list