buglwIP - A Lightweight TCP/IP stack - Bugs: bug #52286, uri pointer error

 
 

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

bug #52286: uri pointer error

Submitter:  xuyao hong <shellstudio>
Submitted:  Thu 26 Oct 2017 09:28:49 AM UTC
   
 
Category:  apps Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Thu 26 Oct 2017 09:32:45 AM UTC, comment #1: 

Pushed, thanks for watching.
However, please:
- do not attach full files but diffs
- do not attach pictures but diffs
- continue discussion in the old bug, even if it is marked as closed, we can continue disussing there or even reopen it - this makes it easier to follow things in the future

Plus side when sending a diff/patch is that you become the commit author of the fix.

Thanks.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 26 Oct 2017 09:28:49 AM UTC, original submission:  

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);
}

xuyao hong <shellstudio>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #42264:  httpd.c.png added by shellstudio (24KiB - image/png - screenshot image)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by shellstudio (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-26 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2017-10-26 shellstudio Attached File- Added httpd.c.png, #42264

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code