[En-Nut-Discussion] Bug #1799374: NutRegisterCgi() Parameter 1

Alain M. alainm at pobox.com
Tue Apr 1 18:00:00 CEST 2008


Harald Kipp escreveu:
> 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.

For what I understand, only the pointer is put on the stack I never 
heard of a compiler that creates temporary strings in the stack!!! The 
string is allocated either in data or code sement (I just am not sure) 
but an interesting point is that Gcc4.2 creates it as "const char*" as 
an aditional secutity measure.

What could be done to remove all doubts is to reclare the fucntiosn with 
const so that it explicitley will not touch it:

int NutRegisterCgi(const char *name, int (*func) (FILE *, REQUEST *))

Alain




More information about the En-Nut-Discussion mailing list