From c6b3a9957d969e31e2bc8dc5559001f46a1087d9 Mon Sep 17 00:00:00 2001 From: Ivan Delamer Date: Mon, 26 Mar 2012 14:53:57 -0600 Subject: [PATCH] Ignore 6LowPAN fragments which won't fit in UIP_BUFSIZE (in case UIP_BUFSIZE < 1280). Otherwise we'll have a buffer overrun. --- core/net/sicslowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/net/sicslowpan.c b/core/net/sicslowpan.c index cfc11f943..319bb5b01 100644 --- a/core/net/sicslowpan.c +++ b/core/net/sicslowpan.c @@ -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);