When the "pos" variable in ncl_getcookie() is negative,
it can skip past the while (pos >= NFSNUMCOOKIES) loop
and return a bogus pointer instead of NULL.
This patch declares "pos" as a u_int to avoid the problem.
Differential D56779
nfs_clsubs.c: Fix ncl_getcookie() when "pos" is negative Authored by rmacklem on Mon, May 4, 3:02 AM. Tags None Referenced Files
Subscribers
Details When the "pos" variable in ncl_getcookie() is negative, This patch declares "pos" as a u_int to avoid the problem. Tested using a small program that open()s a large directory,
Diff Detail
Event Timeline
Comment Actions Add a sanity limit for "off" to avoid an
Comment Actions Increase the "off" sanity limit and declare ndm_eocookie
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||