]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r317372:
authorpfg <pfg@FreeBSD.org>
Mon, 1 May 2017 00:42:31 +0000 (00:42 +0000)
committerpfg <pfg@FreeBSD.org>
Mon, 1 May 2017 00:42:31 +0000 (00:42 +0000)
commit57723a7d7f1db867d4acce11b84c8389cefc9acd
tree7e22a571e38438826731a08c4febf22fca23a9dc
parentc7be2cfcb200eaf9324a541bcef416e4aa947809
MFC r317372:
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, and signed/unsigned comparison, by
matching the types.
lib/libc/gen/scandir.c