lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #30963] httpd suspect behavior


From: Jon H. Peterson
Subject: [lwip-devel] [bug #30963] httpd suspect behavior
Date: Sat, 04 Sep 2010 20:53:39 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 1.0.3705; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)

URL:
  <http://savannah.nongnu.org/bugs/?30963>

                 Summary: httpd suspect behavior
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jonp
            Submitted on: Sat 04 Sep 2010 08:53:38 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: Other

    _______________________________________________________

Details:

v1.3.2
if the if statement,  if(g_iNumCGIs && g_pCGIs), fails, then the if below,
if(i == g_iNumCGIs), is problematic (since i was never set by the loop) and
the Null that was inserted at params may not be replaced....i supposed this
really shouldn't happen, but users do make mistakes (hard to believe). not
sure i understand what the if(i == g_iNumCGIs) is supposed to do?
jon


  /* Does the base URI we have isolated correspond to a CGI handler? */
          if(g_iNumCGIs && g_pCGIs) {
            for(i = 0; i < g_iNumCGIs; i++) {
              if(strcmp(uri, g_pCGIs[i].pcCGIName) == 0) {
                /*
                 * We found a CGI that handles this URI so extract the
                 * parameters and call the handler.
                 */
                 count = extract_uri_parameters(hs, params);
                 uri = g_pCGIs[i].pfnCGIHandler(i, count, hs->params,
                                                hs->param_vals);
                 break;
              }
            }

            /* Did we handle this URL as a CGI? If not, reinstate the
             * original URL and pass it to the file system directly. */
            if(i == g_iNumCGIs)
            {
              /* Replace the ? marker at the beginning of the parameters */
              if(params) {
                 params--;
                *params = '?';
              }




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?30963>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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