glibc/dirent
Aurelien Jarno 72f29e3aab scandir: fix wrong assumption about errno [BZ #17804]
malloc and realloc may set errno to ENOMEM even if they are successful.
The scandir code wrongly assume that they do not change errno, this
causes scandir to fail with ENOMEM even if malloc succeed.

The code already handles that readdir might set errno by calling
__set_errno (0) to clear the error. Move that part at the end of the
loop to also take malloc and realloc into account.

Changelog:
	[BZ #17804]
	* dirent/scandir-tail.c (SCANDIR_TAIL): Move __set_errno (0) at the
	end of the loop. Improve comments.
2017-12-29 14:45:35 +01:00
..
alphasort64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
alphasort.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bug-readdir1.c Update. 2002-12-14 19:49:13 +00:00
closedir.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dirent.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dirfd.c hurd: Fix dirfd symbol exposition from ftw 2017-09-28 00:49:05 +02:00
fdopendir.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getdents64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getdents.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
list.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile Replace = with += in CFLAGS-xxx.c/CPPFLAGS-xxx.c 2017-12-11 13:11:33 -08:00
opendir-tst1.c Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
opendir.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
readdir64_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
readdir64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
readdir_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
readdir.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
rewinddir.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
scandir64-tail.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
scandir64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
scandir-cancel.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
scandir-tail.c scandir: fix wrong assumption about errno [BZ #17804] 2017-12-29 14:45:35 +01:00
scandir.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
scandirat64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
scandirat.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
seekdir.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
telldir.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-fdopendir2.c Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
tst-fdopendir.c Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
tst-scandir64.c Add a test case for scandir. 2015-05-13 12:33:41 -07:00
tst-scandir.c support: Prevent multiple deletion of temporary files 2017-05-08 16:20:40 +02:00
tst-seekdir.c Modify several tests to use test-skeleton.c 2015-08-06 02:59:04 -04:00
Versions Implement scandirat function 2011-08-09 09:57:55 -04:00
versionsort64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
versionsort.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00