[Libwebsockets] [libwebsockets] #13: Client receive buffer overflow

Trac trac at libwebsockets.org
Thu Feb 14 01:30:06 CET 2013


#13: Client receive buffer overflow
-----------------------------------+--------------------
 Reporter:  dbrnz                  |      Owner:  agreen
     Type:  defect                 |     Status:  new
 Priority:  major                  |  Milestone:
Component:  libwebsockets library  |    Version:
 Keywords:                         |
-----------------------------------+--------------------
 According to the documentation, when the receive buffer is full there is
 no error and instead the buffer will spill to the user callback.

 In my case, `rx_buffer_size` has not been set (so it will be the default,
 `LWS_MAX_SOCKET_IO_BUF`, defined to be 4096) and a received packet is
 400166 bytes long. However, there is no apparent check in
 `libwebsocket_client_rx_sm()` for full buffers, and I get a EXC_BAD_ACCESS
 exception (all reproducible and nicely caught in a debugger).

 This is with the latest 1.2 release.


     if you want atomic frames delivered to the callback, you should set
 this to the size of the biggest legal frame that you support. If the frame
 size is exceeded, there is no error, but the buffer will spill to the user
 callback when full


  when full

-- 
Ticket URL: <http://libwebsockets.org/trac/ticket/13>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list