All three functions now prevent negative chunk sizes to be used, which could have been used with hypotetical kernel-memory-read vulnerabilities to exploit the memory-management code.
The first function ("validateChunk") now makes sure that:
The first function ("validateChunk") now makes sure that: