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

View File

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