io: Fix ftw internal realloc buffer (BZ #28126)
commit1836bb2ebf62bd9a3588f2ed2d851c8ae810097a
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 25 Aug 2021 14:17:06 +0000 (25 11:17 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 7 Oct 2021 14:09:16 +0000 (7 11:09 -0300)
treee3b9efc4c4ecd3663dc6dfff8b04749bfc1c0025
parent645277434a42efc547d2cac8bfede4da10b4049f
io: Fix ftw internal realloc buffer (BZ #28126)

The 106ff08526d3ca did not take in consideration the buffer might be
reallocated if the total path is larger than PATH_MAX.  The realloc
uses 'dirbuf', where 'dirstreams' is the allocated buffer.

Checked on x86_64-linux-gnu.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
io/Makefile
io/ftw.c
io/tst-ftw-bz28126.c [new file with mode: 0644]