1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-11-02 09:33:31 +03:00
Commit Graph

7 Commits

Author SHA1 Message Date
Collin Funk
33eff78c8b libio: Add terminating NUL when the first character is EOF in getdelim [BZ #28038]
POSIX requires that the buffer used by getdelim/getline add a
terminating NUL whenever an EOF is read.

* libio/iogetdelim.c (__getdelim): Add a NUL byte when the first
__underflow is called.
* libio/tst-getdelim.c (do_test): Add a test case for the bug.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-10-09 17:38:01 -07:00
Maciej W. Rozycki
5d45da09e6 testsuite: Update tests for 'xfclose' use
Convert (some) tests to use 'xfclose' rather than using plain 'fclose'
call with no error checking or plain missing such a call.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-09-05 11:53:31 +01:00
Maciej W. Rozycki
2d47b01de0 testsuite: Update tests for 'xfmemopen' use
Convert tests to use 'xfmemopen' rather than open-coding error checks
with 'fmemopen' or plain missing them, where 'fmemopen' itself is not
the scope of testing.  Leave 'fmemopen' tests alone.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-09-05 11:53:31 +01:00
Paul Eggert
2642002380 Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
Frédéric Bérat
3f54e459a6 libio/tst-getdelim: Add new test covering NUL as a delimiter
Add a new test to getdelim to verify that '\0' can be set as a
delimiter.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-08-14 11:48:34 +02:00
Paul Eggert
dff8da6b3e Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Andreas Schwab
a09183aed7 getdelim: ensure error indicator is set on error (bug 29917)
POSIX requires that getdelim and getline set the error indicator on the
stream when an error occured, in addition to setting errno.
2023-01-02 10:58:49 +01:00