summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/tmpnam.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-08-30 19:54:04 +0000
committerache <ache@FreeBSD.org>2001-08-30 19:54:04 +0000
commitf8e201c54991f8ae822c054363d85332f5b9a013 (patch)
tree5f2a09e41a33b0f67a9f06e3d8f9ae0423539ed0 /lib/libc/stdio/tmpnam.c
parent0c27263b4a639850fd1858db4b63b142a3b57a27 (diff)
downloadFreeBSD-src-f8e201c54991f8ae822c054363d85332f5b9a013.zip
FreeBSD-src-f8e201c54991f8ae822c054363d85332f5b9a013.tar.gz
Add more EOVERFLOW checks.
When file offset tends to be negative due to internal and ungetc buffers additions counted, try to discard some ungetc data first, then return EBADF. Later one can happens if lseek(fileno(fd),...) called f.e. POSIX says that ungetc beyond beginning of the file results are undefined, so we can just discard some of ungetc data in that case. Don't rely on gcc cast when checking for overflow, use OFF_MAX. Cosmetique.
Diffstat (limited to 'lib/libc/stdio/tmpnam.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud