sleuthkit/sleuthkit — pull request #279 by joachimmetz (2013-12-13 19:55:37+00:00)
Title: Changed img layer read behavior to be POSIX compliant.

Currently the img layer reads do not have POSIX compliant behavior.

From man pread

RETURN VALUE
On success, the number of bytes read or written is returned (zero indicates that nothing was written, in the case of pwrite(), or end of file, in the case of pread()), or -1 on error, in which case errno is set to indicate the error.

Please consider this patch to correct this.