|
@@ -509,6 +509,10 @@ slhc_uncompress(struct slcompress *comp, unsigned char *icp, int isize)
|
|
|
if(x < 0 || x > comp->rslot_limit)
|
|
|
goto bad;
|
|
|
|
|
|
+ /* Check if the cstate is initialized */
|
|
|
+ if (!comp->rstate[x].initialized)
|
|
|
+ goto bad;
|
|
|
+
|
|
|
comp->flags &=~ SLF_TOSS;
|
|
|
comp->recv_current = x;
|
|
|
} else {
|
|
@@ -673,6 +677,7 @@ slhc_remember(struct slcompress *comp, unsigned char *icp, int isize)
|
|
|
if (cs->cs_tcp.doff > 5)
|
|
|
memcpy(cs->cs_tcpopt, icp + ihl*4 + sizeof(struct tcphdr), (cs->cs_tcp.doff - 5) * 4);
|
|
|
cs->cs_hsize = ihl*2 + cs->cs_tcp.doff*2;
|
|
|
+ cs->initialized = true;
|
|
|
/* Put headers back on packet
|
|
|
* Neither header checksum is recalculated
|
|
|
*/
|