buglwIP - A Lightweight TCP/IP stack - Bugs: bug #56057, HTTPd: 404 missing from fsdata.c...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Mike Spenard <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 Planned Release:  None
lwIP version:  Other

Tue 02 Apr 2019 07:19:51 PM UTC, original submission:  

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"

Mike Spenard <mikespenard>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mikespenard (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5