diff --git a/manticore/platforms/linux.py b/manticore/platforms/linux.py index f62b8d4e8..564c64f1f 100644 --- a/manticore/platforms/linux.py +++ b/manticore/platforms/linux.py @@ -1248,19 +1248,17 @@ def sys_lseek(self, fd, offset, whence): SEEK_CUR: The file offset is set to its current location plus offset bytes. SEEK_END: The file offset is set to the size of the file plus offset bytes. - :return: 0 (Success), or EBADF (fd is not a valid file descriptor or is not open) + :return: offset from file beginning, or EBADF (fd is not a valid file descriptor or is not open) ''' signed_offset = self._to_signed_dword(offset) try: - self._get_fd(fd).seek(signed_offset, whence) + return self._get_fd(fd).seek(signed_offset, whence) except FdError as e: logger.info(("LSEEK: Not valid file descriptor on lseek." "Fd not seekable. Returning EBADF")) return -e.err - return 0 - def sys_read(self, fd, buf, count): data: bytes = bytes() if count != 0: