lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #29105] Review printf formatters


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #29105] Review printf formatters
Date: Sun, 07 Mar 2010 08:59:30 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2) Gecko/20100115 Firefox/3.6

URL:
  <http://savannah.nongnu.org/bugs/?29105>

                 Summary: Review printf formatters
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: So 07 Mär 2010 08:59:29 GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 1.4.0
            lwIP version: CVS Head

    _______________________________________________________

Details:

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.





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?29105>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]