Date: Thu, 30 Aug 2001 12:54:04 -0700 (PDT) From: "Andrey A. Chernov" <ache@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/stdio fseek.c ftell.c Message-ID: <200108301954.f7UJs4p40077@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
ache 2001/08/30 12:54:04 PDT Modified files: lib/libc/stdio fseek.c ftell.c Log: 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. Revision Changes Path 1.20 +62 -25 src/lib/libc/stdio/fseek.c 1.13 +34 -8 src/lib/libc/stdio/ftell.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108301954.f7UJs4p40077>