diff options
author | ache <ache@FreeBSD.org> | 2001-09-01 11:21:28 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-09-01 11:21:28 +0000 |
commit | 625f4c5432005830b7f8ae203a8ed7bdcbf67bb0 (patch) | |
tree | 49a1657a4de0774a1f328366f4f374f654050ed7 /lib/libc/stdio/fseek.c | |
parent | 116ee96d9df70379bb81e6984c869556395bd5fd (diff) | |
download | FreeBSD-src-625f4c5432005830b7f8ae203a8ed7bdcbf67bb0.zip FreeBSD-src-625f4c5432005830b7f8ae203a8ed7bdcbf67bb0.tar.gz |
If lseek to wrong value sucessfully happens despite all pre-checks, set __SERR
to indicate that stream becomes inconsistent.
Diffstat (limited to 'lib/libc/stdio/fseek.c')
-rw-r--r-- | lib/libc/stdio/fseek.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c index a3c80c1..d06e408 100644 --- a/lib/libc/stdio/fseek.c +++ b/lib/libc/stdio/fseek.c @@ -297,6 +297,7 @@ dumb: (*seekfn)(fp->_cookie, (fpos_t)offset, whence) == POS_ERR) return (-1); if (ltest && fp->_offset > LONG_MAX) { + fp->_flags |= __SERR; errno = EOVERFLOW; return (-1); } |