bug 2184: Integer overflow in MacLow
authorTom Henderson <tomh@tomh.org>
Mon, 28 Sep 2015 20:27:25 -0700
changeset 11676 05ea1489e509
parent 11675 d12d2c296132
child 11677 1e2add816314
bug 2184: Integer overflow in MacLow
src/wifi/model/mac-low.cc
--- a/src/wifi/model/mac-low.cc	Mon Sep 28 20:23:11 2015 -0700
+++ b/src/wifi/model/mac-low.cc	Mon Sep 28 20:27:25 2015 -0700
@@ -1662,7 +1662,7 @@
             }
           preamble = WIFI_PREAMBLE_NONE;
         }
-      m_mpduReferenceNumber = ((m_mpduReferenceNumber + 1) % 4294967296);
+      m_mpduReferenceNumber += 1;  // this variable is allowed to overflow
     }
 }