[Top][All Lists]

[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: Gecko/20070309 Firefox/

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 :

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:


  Message posté via/par Savannah

reply via email to

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