lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #19162] lwip_sendto: possible to corrupt remote addr/p


From: Frédéric Bernon
Subject: [lwip-devel] [bug #19162] lwip_sendto: possible to corrupt remote addr/port connection state
Date: Fri, 04 May 2007 13:44:04 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #34, bug #19162 (project lwip):

Ok, new patch file merged with Jonathan's patch.

I also add defines for netbuf_copy & netbuf_len (same "spirit" than for
netbuf_fromaddr & netbuf_fromport) :

#define netbuf_copy(buf,dataptr,len) netbuf_copy_partial(buf,dataptr,len,0)
#define netbuf_len(buf)              ((buf)->p->tot_len)

And I have rename fields in netbuf (and in all the code, with a comment in
CHANGELOG about that) :

struct netbuf {
  struct pbuf *p, *ptr;
  struct ip_addr *addr;
  u16_t port;
};

And netconn_sendto :

err_t
netconn_sendto(struct netconn *conn, struct netbuf *buf, struct ip_addr
*addr, u16_t port)
{ if (buf!=NULL) {
    buf->addr = addr;
    buf->port = port;
    return netconn_send( conn, buf);
  }
  return ERR_VAL;
} 


Ok to check in like that ?


(file #12692)
    _______________________________________________________

Additional Item Attachment:

File name: lwip_sendto.patch              Size:12 KB


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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