bug in contributed fastcgi code

Volker Wysk <[email protected]> Tue, 15 Jul 2003 18:37:26 +0200 (CEST)
Newsgroups gmane.comp.gcc.cgicc.bugs
Message-ID <Pine.LNX.4.31.0307151835180.6263-100000@volker>
Hi

This time, it's a real bug. In contrib/FCgiIO.cpp:

  // Parse environment
  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);
  }

The "if" line should be:

    if(i == STDNS string::npos)


Bye,
Volker