Browse Source

Added assertion in shiftBuffer to check size.

Tatsuhiro Tsujikawa 14 years ago
parent
commit
e5c27034f3
1 changed files with 1 additions and 0 deletions
  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;
 }