1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

coverity 83665 fail on null buffer

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-11-30 12:54:48 +08:00
parent cd838506a9
commit adc720dfb5

View file

@ -214,8 +214,10 @@ int libwebsocket_client_rx_sm(struct libwebsocket *wsi, unsigned char c)
case LWS_RXPS_PAYLOAD_UNTIL_LENGTH_EXHAUSTED:
if (!wsi->u.ws.rx_user_buffer)
if (!wsi->u.ws.rx_user_buffer) {
lwsl_err("NULL client rx_user_buffer\n");
return 1;
}
if ((!wsi->u.ws.this_frame_masked) || wsi->u.ws.all_zero_nonce)
wsi->u.ws.rx_user_buffer[LWS_SEND_BUFFER_PRE_PADDING +