]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/serial/SerialActiveMessageP.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / lib / serial / SerialActiveMessageP.nc
index 0432ad2e98c46f0743bdf89dd2ce0fa84722b756..7bdc56382c65d5716fcff5c5d799098ab8a5955c 100644 (file)
@@ -58,6 +58,11 @@ implementation {
                                          message_t* msg,
                                          uint8_t len) {
     serial_header_t* header = getHeader(msg);
+
+    if (len > call Packet.maxPayloadLength()) {
+      return ESIZE;
+    }
+
     header->dest = dest;
     // Do not set the source address or group, as doing so
     // prevents transparent bridging. Need a better long-term