[Libwebsockets] [libwebsockets] #52: broken compilation with "without_extensions=1"

Trac trac at libwebsockets.org
Tue Dec 10 03:56:41 CET 2013


#52: broken compilation with "without_extensions=1"
-------------------------------------+-----------------
  Reporter:  mroszko                 |      Owner:
      Type:  defect                  |     Status:  new
  Priority:  major                   |  Milestone:
 Component:  libwebsocket test apps  |    Version:
Resolution:                          |   Keywords:
-------------------------------------+-----------------

Comment (by mroszko):

 Second problem with LWS_NO_EXTENSIONS is that this block inside the same
 function:
         if (wsi->ssl) {
                 n = SSL_write(wsi->ssl, buf, len);
                 lws_latency(context, wsi, "SSL_write lws_issue_raw", n, n
 >= 0);
                 if (n < 0) {
                         if (errno == EAGAIN || errno == EINTR) {
                                 n = 0;
                                 goto handle_truncated_send;
                         }
                         lwsl_debug("ERROR writing to socket\n");
                         return -1;
                 }
         } else {


 will call handle_truncated_send

 BUT
 #ifndef LWS_NO_EXTENSIONS
 handle_truncated_send:
 #endif

 There's no protection on when that goto is compiled in.

--
Ticket URL: <http://libwebsockets.org/trac/libwebsockets/ticket/52#comment:1>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list