__pread64_chk

Name

__pread64_chk -- read from a file descriptor at a given offset, with buffer overflow checking

Synopsis

#include <unistd.h>

ssize_t __pread64_chk(int fd, void * buf, size_t nbytes, off64_t offset, size_t buflen);

Description

The interface __pread64_chk() shall function in the same way as the interface pread64(), except that __pread64_chk() shall check for buffer overflow before computing a result. If an overflow is anticipated, the function shall abort and the program calling it shall exit.

The parameter buflen specifies the size of the buffer buf. If nbytes exceeds buflen, the function shall abort, and the program calling it shall exit.

The __pread64_chk() function is not in the source standard; it is only in the binary standard.