bug-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FCgiIO.cpp bug


From: Craig Anderson
Subject: FCgiIO.cpp bug
Date: Fri, 26 Apr 2002 07:05:18 -0700 (PDT)

Hello and thanks for making a great class library.

I believe I ran across a small bug in FCgiIO.cpp,
FCgiIO class constructor.

In the environment parse routine:
for(char **e = fRequest.envp; *e != NULL; ++e) {
    STDNS string s(*e);
    STDNS string::size_type i = s.find('=');
    if(i != STDNS string::npos)
      throw STDNS runtime_error("Illegally formed
environment");
    fEnv[s.substr(0, i)] = s.substr(i + 1);
}

It looks like "if(i != STDNS string::npos)" should be
"if(i == STDNS string::pos)".

Hope this is of some use
-- Craig


__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]