buglwIP - A Lightweight TCP/IP stack - Bugs: bug #29105, Review printf formatters

 
 

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

bug #29105: Review printf formatters

Submitter:  Simon Goldschmidt <goldsimon>
Submitted:  Sun 07 Mar 2010 08:59:29 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

Mon 08 Mar 2010 05:12:00 PM UTC, comment #1: 

Tried my best to catch them all. Please reopen if you find more.

Simon Goldschmidt <goldsimon>
Group administrator
Sun 07 Mar 2010 08:59:29 AM UTC, original submission:  

Martin Velek found this on lwip-devel:

In the file etharp.c, line 1166 (cvs head) in debug mode, the mac addresses and
frame type are defined as:
"ethernet_input: dest:%02x:%02x:%02x:%02x:%02x:%02x,
src:%02x:%02x:%02x:%02x:%02x:%02x, type:%2hx\n",

This format string violates some non-sprintf functions. Every port has
in the cc.h  /* Define (sn)printf formatters for these lwIP types */.
I would suggest to change to "ethernet_input:
dest:%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F",
src:%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F",
type:%2"U16_F"\n"


- X8_F does not yet exist -> must be added
- check the rest of the source code if there are other places with "hardcoded" values.

Simon Goldschmidt <goldsimon>
Group administrator

 

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

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 goldsimon (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
    2010-03-08 goldsimon Item GroupNone Change Request
        StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code