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

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Sun 07 Mar 2010 08:59:29 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Change RequestStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (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
    Mon 08 Mar 2010 05:12:00 PM UTCgoldsimonItem GroupNone=>Change Request
      StatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1