|
be327c6e
|
2022-08-24T01:58:58
|
|
fgetwln: Add comment about lack of getwline(3) for recommendation
Ideally we'd recommend getwline(3), but unfortunately even though it
was part of the ISO/IEC TR 24731-2:2010 draft, it did not make it into
C11 and is not widely implemented.
|
|
48107fc8
|
2021-11-28T23:19:16
|
|
build: Clarify link-time warnings
Mention the involved function instead of stating an implicit "this
function". Mention libbsd when proposing using an alternative libmd
to make the context clear.
|
|
4feda870
|
2021-02-11T04:40:48
|
|
Require a semicolon for libbsd_link_warning() macro
Remove the semicolon in the macro definition to force adding one on the
call sites, to make the code look like an actual function.
|
|
3cabf46b
|
2018-05-21T03:15:59
|
|
Deprecate fgetwln()
This function has the same problems as fgetln() which is already marked
as deprecated.
|
|
c8f0723d
|
2016-01-27T15:10:11
|
|
Fix heap buffer overflow in fgetwln()
In the function fgetwln() there's a 4 byte heap overflow.
There is a while loop that has this check to see whether there's still
enough space in the buffer:
if (!fb->len || wused > fb->len) {
If this is true more memory gets allocated. However this test won't be
true if wused == fb->len, but at that point wused already points out
of the buffer. Some lines later there's a write to the buffer:
fb->wbuf[wused++] = wc;
This bug was found with the help of address sanitizer.
Warned-by: ASAN
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93881
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
32388fe5
|
2014-11-03T23:21:52
|
|
Use reallocarray() instead of malloc() or realloc()
|
|
a97ce513
|
2012-11-23T21:19:45
|
|
Add new fgetwln() function
Man page taken from FreeBSD.
|