[En-Nut-Discussion] Bug #1799374: NutRegisterCgi() Parameter 1
Nathan Moore
nategoose at gmail.com
Tue Apr 1 16:31:57 CEST 2008
The point of this was that the strings that are passed aren't guaranteed to
be constant or even there at all after the call to NutCgiRegister.
They do tend to be constant and stay put wit normal use, but it's not
guaranteed and won't work as expected if you do something like:
char foo[] = "web_page.cgi";
NutCgiRegister(foo, bar);
sprintf(foo, "I like kittens"); // <-- this is the silliness
If this silliness isn't done then you still have the issue that if the
thread that registered the cgi pages exits you lose it's local variables so
char foo[] above would go away.
On Tue, Apr 1, 2008 at 5:23 AM, Harald Kipp <harald.kipp at egnite.de> wrote:
> Hi,
>
> Can someone please confirm whether this is correct or not?
> http://sourceforge.net/tracker/?group_id=34079
>
> IMHO, the string is never stored on the stack, but in the data segment.
> But I'm not fully sure.
>
> Thanks,
>
> Harald
>
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
More information about the En-Nut-Discussion
mailing list