lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #36283] PPP struct used on header size computation and


From: Sylvain Rochet
Subject: [lwip-devel] [bug #36283] PPP struct used on header size computation and not packed
Date: Tue, 24 Apr 2012 13:48:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Iceweasel/10.0.2

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

                 Summary: PPP struct used on header size computation and not
packed
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: gradator
            Submitted on: Tue 24 Apr 2012 01:48:09 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:

The pppInputHeader size is used in pbuf_header,

struct pppInputHeader *pih;
if (pbuf_header(pb, sizeof(*pih) - sizeof(inProtocol)) != 0) {

if(pbuf_header(nb, -(int)sizeof(struct pppInputHeader))) {

so, pppInputHeader need to be packed, otherwise on 32 bits system the
structure is 8 byte long due to alignment, which fail header size
computations.

Attached is a patch packing pppInputHeader struct, which fix this issue.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 24 Apr 2012 01:48:09 PM GMT  Name: pack-pppInputHeader.patch  Size:
624B   By: gradator

<http://savannah.nongnu.org/bugs/download.php?file_id=25720>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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