]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
scandir(3): promote arraysz to size_t to match numitems.
authorpfg <pfg@FreeBSD.org>
Mon, 24 Apr 2017 14:56:41 +0000 (14:56 +0000)
committerpfg <pfg@FreeBSD.org>
Mon, 24 Apr 2017 14:56:41 +0000 (14:56 +0000)
commit312779019fbac4310aac2ab6eb6bf91954279571
treea8eabafb672f123acadf5dcb9c21df0e34f38a4d
parent115c54a7b5b650ddf9d9fd22dcebbf148e181fb8
scandir(3): promote arraysz to size_t to match numitems.

The internal array size goes through a loop and is compared with numitems
which at its limits makes can be unreachably higher than arraysz.
Prevent an hypothetical overflow by matching the types.

MFC after: 1 week
lib/libc/gen/scandir.c