Fetch-Session MBZ field can contain garbage
If NDEBUG is defined then the MBZ field of the Fetch-Session message
contains garbage from a previously received message in the buffer
since the memset() which explicitly zeroes the field is compiled out.
@@ -2683,9 +2683,7 @@ _OWPWriteFetchSession(
}
buf[0] = OWPReqFetchSession;
-#ifndef NDEBUG
- memset(&buf[1],0,7); /* Unused */
-#endif
+ memset(&buf[1],0,7);
*(uint32_t*)&buf[8] = htonl(begin);
*(uint32_t*)&buf[12] = htonl(end);
memcpy(&buf[16],sid,16);
