{
int n;
+ if (!wsi->u.hdr.ah)
+ return 0;
+
n = wsi->u.hdr.ah->frag_index[h];
if (!n)
return 0;
int n;
int len = 0;
+ if (!wsi->u.hdr.ah)
+ return 0;
+
n = wsi->u.hdr.ah->frag_index[h];
if (!n)
return 0;
enum lws_token_indexes h, int frag_idx)
{
int n = 0;
- int f = wsi->u.hdr.ah->frag_index[h];
+ int f;
+
+ if (!wsi->u.hdr.ah)
+ return -1;
+
+ f = wsi->u.hdr.ah->frag_index[h];
if (!f)
return -1;
if (toklen >= len)
return -1;
+ if (!wsi->u.hdr.ah)
+ return -1;
+
n = wsi->u.hdr.ah->frag_index[h];
if (!n)
return 0;
wsi->u.ws.rsv_first_msg = (c & 0x70);
wsi->u.ws.frame_is_binary =
wsi->u.ws.opcode == LWSWSOPC_BINARY_FRAME;
+ wsi->u.ws.first_fragment = 1;
break;
case 3:
case 4:
/* eff_buf may be pointing somewhere completely different now,
* it's the output
*/
+ wsi->u.ws.first_fragment = 0;
if (n < 0) {
/*
* we may rely on this to get RX, just drop connection