#
dc36d6f9 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
lib: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
lib: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
4e0e01bf |
| 07-Nov-2023 |
Ed Maste <emaste@FreeBSD.org> |
fflush: correct buffer handling in __sflush
Two additional stdio changes followed 86a16ada1ea6 and need to be reverted as part of the fflush fix.
This reverts commit 6e13794fbe6e82c21365d0fd66769bf
fflush: correct buffer handling in __sflush
Two additional stdio changes followed 86a16ada1ea6 and need to be reverted as part of the fflush fix.
This reverts commit 6e13794fbe6e82c21365d0fd66769bf8b19c0197. This reverts commit bafaa70b6f9098d83d074968c8e6747ecec1e118.
Fixes: d09a3bf72c0b ("fflush: correct buffer handling in __sflush") Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42491
show more ...
|
#
418f026b |
| 07-Nov-2023 |
Ed Maste <emaste@FreeBSD.org> |
libc: remove unused errno.h include
errno.h was added in 44cf1e5eb470, which has been reverted.
Fixes: d09a3bf72c0b ("fflush: correct buffer handling in __sflush") Sponsored by: The FreeBSD Foundat
libc: remove unused errno.h include
errno.h was added in 44cf1e5eb470, which has been reverted.
Fixes: d09a3bf72c0b ("fflush: correct buffer handling in __sflush") Sponsored by: The FreeBSD Foundation
show more ...
|
#
d09a3bf7 |
| 03-Aug-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
fflush: correct buffer handling in __sflush
This fixes CVE-2014-8611 correctly.
The commit that purported to fix CVE-2014-8611 (805288c2f062) only hid it behind another bug. Two later commits, 86a
fflush: correct buffer handling in __sflush
This fixes CVE-2014-8611 correctly.
The commit that purported to fix CVE-2014-8611 (805288c2f062) only hid it behind another bug. Two later commits, 86a16ada1ea6 and 44cf1e5eb470, attempted to address this new bug but mostly just confused the issue. This commit rolls back the three previous changes and fixes CVE-2014-8611 correctly.
The key to understanding the bug (and the fix) is that `_w` has different meanings for different stream modes. If the stream is unbuffered, it is always zero. If the stream is fully buffered, it is the amount of space remaining in the buffer (equal to the buffer size when the buffer is empty and zero when the buffer is full). If the stream is line-buffered, it is a negative number reflecting the amount of data in the buffer (zero when the buffer is empty and negative buffer size when the buffer is full).
At the heart of `fflush()`, we call the stream's write function in a loop, where `t` represents the return value from the last call and `n` the amount of data that remains to be written. When the write function fails, we need to move the unwritten data to the top of the buffer (unless nothing was written) and adjust `_p` (which points to the next free location in the buffer) and `_w` accordingly. These variables have already been set to the values they should have after a successful flush, so instead of adjusting them down to reflect what was written, we're adjusting them up to reflect what remains.
The bug was that while `_p` was always adjusted, we only adjusted `_w` if the stream was fully buffered. The fix is to also adjust `_w` for line-buffered streams. Everything else is just noise.
Fixes: 805288c2f062 Fixes: 86a16ada1ea6 Fixes: 44cf1e5eb470 Sponsored by: Klara, Inc.
show more ...
|
#
559a218c |
| 01-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Kee
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
show more ...
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
44cf1e5e |
| 02-Sep-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
libc/stdio: only roll FILE state back on EINTR
Reported by: JunT <takimoto-j@kba.biglobe.ne.jp> PR: 266171 Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Different
libc/stdio: only roll FILE state back on EINTR
Reported by: JunT <takimoto-j@kba.biglobe.ne.jp> PR: 266171 Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36427
show more ...
|
Revision tags: release/13.1.0 |
|
#
bafaa70b |
| 06-Mar-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
libc __sfvwrite(): roll back FILE buffer pointer on fflush error
__sfvwrite() advances the pointer before calling fflush. If fflush() fails, it is not enough to roll back inside it, because we can
libc __sfvwrite(): roll back FILE buffer pointer on fflush error
__sfvwrite() advances the pointer before calling fflush. If fflush() fails, it is not enough to roll back inside it, because we cannot know how much was advanced by the caller.
Reported by: Peter <pmc@citylink.dinoex.sub.org> Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Fixes: 86a16ada1ea608408cec370171d9f59353e97c77
show more ...
|
Revision tags: release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
82725ba9 |
| 23-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325999 through r326131.
|
#
8a16b7a1 |
| 20-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier f
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0 |
|
#
d1d01586 |
| 05-Sep-2013 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head
|
#
40f65a4d |
| 07-Aug-2013 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r254014
|
#
552311f4 |
| 17-Jul-2013 |
Xin LI <delphij@FreeBSD.org> |
IFC @253398
|
#
cfe30d02 |
| 19-Jun-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge fresh head.
|
Revision tags: release/8.4.0 |
|
#
5a6307cf |
| 23-Apr-2013 |
Ed Maste <emaste@FreeBSD.org> |
Convert libc/stdio from K&R to ANSI C
And add '__restrict' where it appeared in the header prototypes
|
#
1d8053c5 |
| 23-Apr-2013 |
Ed Maste <emaste@FreeBSD.org> |
Renumber clauses to reduce diffs to other versions
NetBSD, OpenBSD, and Android's Bionic all number the clauses 1 through 3, so follow suit to make comparison easier.
Acked-by: imp@
|
Revision tags: release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0 |
|
#
1a0fda2b |
| 04-Mar-2010 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
IFH@204581
|
#
9199c09a |
| 06-Jan-2010 |
Warner Losh <imp@FreeBSD.org> |
Merge from head at r201628.
# This hasn't been tested, and there are at least three bad commits # that need to be backed out before the branch will be stable again.
|
#
28f22238 |
| 02-Dec-2009 |
Garrett Wollman <wollman@FreeBSD.org> |
MFC revs 199781,199782,199784,199785,199786:
Eliminate dead stores.
In __mbsconv(), if prec was zero, nconv could have been used uninitialized. Initialize it to a safe value so that there's
MFC revs 199781,199782,199784,199785,199786:
Eliminate dead stores.
In __mbsconv(), if prec was zero, nconv could have been used uninitialized. Initialize it to a safe value so that there's no chance of returning an error if stack garbage happens to be equal to (size_t)-1 or (size_t)-2.
In svc_raw_reply(), don't leave stat uninitialized if the MSG_ACCEPTED && SUCCESS case succeeds. The stack garbage might be zero.
In clnt_raw_create(), avoid minor race condition initializing the file-scope variable clntraw_private.
Found by: Clang static analyzer
show more ...
|
#
e40c3238 |
| 25-Nov-2009 |
Garrett Wollman <wollman@FreeBSD.org> |
Eliminate dead store.
Found by: Clang static analyzer MFC after: 7 days
|
Revision tags: release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
c879ae35 |
| 09-Jan-2007 |
Warner Losh <imp@FreeBSD.org> |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
#
92a5b2ee |
| 08-Jun-2004 |
David Schultz <das@FreeBSD.org> |
Rename cantwrite() to prepwrite(). The latter is less confusing, since the macro isn't really a predicate, and it has side-effects. Also, don't set errno if prepwrite() fails, since this is done in
Rename cantwrite() to prepwrite(). The latter is less confusing, since the macro isn't really a predicate, and it has side-effects. Also, don't set errno if prepwrite() fails, since this is done in prepwrite() now.
show more ...
|
Revision tags: release/4.10.0_cvs, release/4.10.0 |
|
#
1b629e86 |
| 02-Mar-2004 |
Jordan K. Hubbard <jkh@FreeBSD.org> |
If handed a file pointer we can't write to, set errno properly to EBADF in order to get SUSv2 conformant behavior in higher level calls like fputs() and puts().
Reviewed by: bde
|
Revision tags: release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs |
|
#
333fc21e |
| 22-Mar-2002 |
David E. O'Brien <obrien@FreeBSD.org> |
Fix the style of the SCM ID's. I believe have made all of libc .c's as consistent as possible.
|
#
8fb3f3f6 |
| 21-Mar-2002 |
David E. O'Brien <obrien@FreeBSD.org> |
Remove 'register' keyword.
|