1
0
mirror of https://github.com/oliverschmidt/contiki.git synced 2025-01-10 11:29:38 +00:00

Ignore 6LowPAN fragments which won't fit in UIP_BUFSIZE (in case

UIP_BUFSIZE < 1280). Otherwise we'll have a buffer overrun.
This commit is contained in:
Ivan Delamer 2012-03-26 14:53:57 -06:00
parent 946f00bf7b
commit c6b3a9957d

@ -1624,7 +1624,7 @@ input(void)
* reassembly is off * reassembly is off
* start it if we received a fragment * start it if we received a fragment
*/ */
if(frag_size > 0) { if((frag_size > 0) && (frag_size <= UIP_BUFSIZE)) {
sicslowpan_len = frag_size; sicslowpan_len = frag_size;
reass_tag = frag_tag; reass_tag = frag_tag;
timer_set(&reass_timer, SICSLOWPAN_REASS_MAXAGE*CLOCK_SECOND); timer_set(&reass_timer, SICSLOWPAN_REASS_MAXAGE*CLOCK_SECOND);