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

Submitted by:  xuyao hong <shellstudio>
Submitted on:  Thu 26 Oct 2017 09:28:49 AM UTC  
 
Category: appsSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned 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>
Project AdministratorIn charge of this item.
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>

 

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
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by shellstudio (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 26 Oct 2017 09:32:45 AM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Thu 26 Oct 2017 09:28:49 AM UTCshellstudioAttached File-=>Added httpd.c.png, #42264

    Back to the top


    Powered by Savane 3.1-cleanup1