Linux: Adjust gedents64 buffer size to int range [BZ #24740]
authorFlorian Weimer <fweimer@redhat.com>
Thu, 27 Jun 2019 13:08:40 +0000 (15:08 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 27 Jun 2019 13:08:40 +0000 (15:08 +0200)
commita620bd7935c4b2dc94e472e62bd9a5c9434ea7b7
tree0741388f6c9acdf7621676f6bf4829f0bb7ac44f
parentd039da1c00e01f8d3c3d74f439a971eb73e3045e
Linux: Adjust gedents64 buffer size to int range [BZ #24740]

The kernel interface uses type unsigned int, but there is an
internal conversion to int, so INT_MAX is the correct limit.
Part of the buffer will always be unused, but this is not a
problem.  Such huge buffers do not occur in practice anyway.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
ChangeLog
sysdeps/unix/sysv/linux/getdents64.c
sysdeps/unix/sysv/linux/mips/mips64/getdents64.c
sysdeps/unix/sysv/linux/tst-getdents64.c