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

coverity 83666 fail on null buffer

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

View file

@ -804,8 +804,10 @@ handle_first:
case LWS_RXPS_PAYLOAD_UNTIL_LENGTH_EXHAUSTED:
if (!wsi->u.ws.rx_user_buffer)
if (!wsi->u.ws.rx_user_buffer) {
lwsl_err("NULL user buffer...\n");
return 1;
}
if (wsi->u.ws.all_zero_nonce)
wsi->u.ws.rx_user_buffer[LWS_SEND_BUFFER_PRE_PADDING +