[krbdev.mit.edu #8230] Improper _findfirst() usage can cause crashes on 64-bit Windows
Greg Hudson via RT
rt at krbdev.mit.edu
Mon Aug 10 12:50:58 EDT 2015
_findfirst() has a return type of intptr_t. Code which assigns its
value to a "long" variable, and then passes the result to _findnext(),
can crash on 64-bit Windows where long is 32 bits and pointers are 64
bits.
This bug can result in build failures running libecho as follows
(reported by github user egonk):
NMAKE : fatal error U1077: '..\..\util\windows\obj\AMD64\rel\libecho' :
return code '0xc0000005'
This misuse is also present in the opendir()/readdir()/closedir() shims
in util/support/plugins.c.
More information about the kfwdev
mailing list