lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #52286] uri pointer error


From: xuyao hong
Subject: [lwip-devel] [bug #52286] uri pointer error
Date: Thu, 26 Oct 2017 05:28:50 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50

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

                 Summary: uri pointer error
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: shellstudio
            Submitted on: Thu 26 Oct 2017 09:28:49 AM UTC
                Category: apps
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

static err_t
http_find_error_file(struct http_state *hs, u16_t error_nr)
{
  const char *uri, *uri1, *uri2, *uri3;

  if (error_nr == 501) {
    uri1 = "/501.html";
    uri2 = "/501.htm";
    uri3 = "/501.shtml";
  } else {
    /* 400 (bad request is the default) */
    uri1 = "/400.html";
    uri2 = "/400.htm";
    uri3 = "/400.shtml";
  }
  if (fs_open(&hs->file_handle, uri1) == ERR_OK) {
    uri = uri1;
  } else if (fs_open(&hs->file_handle, uri2) == ERR_OK) {
    uri = uri2;
  } else if (fs_open(&hs->file_handle, uri3) == ERR_OK) {
    uri = uri3; //////////here!
  } else {
    LWIP_DEBUGF(HTTPD_DEBUG, ("Error page for error %"U16_F" not found\n",
                              error_nr));
    return ERR_ARG;
  }
  return http_init_file(hs, &hs->file_handle, 0, uri, 0, NULL);
}



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 26 Oct 2017 09:28:49 AM UTC  Name: httpd.c.png  Size: 24KiB   By:
shellstudio
screenshot image
<http://savannah.nongnu.org/bugs/download.php?file_id=42264>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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