nfs4: Do not rely on implementation defined casting uint32 to int32

This solves CID 991172.
This commit is contained in:
Pawel Dziepak
2013-03-19 01:24:03 +01:00
parent a43c0e5ce0
commit 271d1540b1
@@ -477,7 +477,7 @@ ConnectionStream::Receive(void** _buffer, uint32* _size)
record_size = ntohl(record_size);
ASSERT(record_size > 0);
last_one = static_cast<int32>(record_size) < 0;
last_one = (record_size & LAST_FRAGMENT) != 0;
record_size &= LAST_FRAGMENT - 1;
void* ptr = realloc(buffer, size + record_size);