Explorar el Código

Added assertion in shiftBuffer to check size.

Tatsuhiro Tsujikawa hace 14 años
padre
commit
e5c27034f3
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/MSEHandshake.cc

+ 1 - 0
src/MSEHandshake.cc

@@ -157,6 +157,7 @@ bool MSEHandshake::send()
 
 void MSEHandshake::shiftBuffer(size_t offset)
 {
+  assert(rbufLength_ >= offset);
   memmove(rbuf_, rbuf_+offset, rbufLength_-offset);
   rbufLength_ -= offset;
 }