[bug #56057] HTTPd: 404 missing from fsdata.c causes sys_assert()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[bug #56057] HTTPd: 404 missing from fsdata.c causes sys_assert()

Wilfred
URL:
  <https://savannah.nongnu.org/bugs/?56057>

                 Summary: HTTPd: 404 missing from fsdata.c causes sys_assert()
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: mikespenard
            Submitted on: Tue 02 Apr 2019 07:19:51 PM 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: Other

    _______________________________________________________

Details:

I traced the "mem_free: mem->used" bomb out to the 404.html missing from
fsdata.c The http_get_404_file() function checks for it missing:

     if (err != ERR_OK) {
        /* 404.htm doesn't exist either. Indicate to the caller that it
should
         * send back a default 404 page.
         */
        *uri = NULL;
        return NULL;

...however, http_find_file() doesn’t have any code to properly handle that
NULL:

    } else {
      file = http_get_404_file(hs, &uri);
    }

Which causes free_mem() to bomb out with "mem_free: mem->Used"







    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?56057>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel