ntdll: Don't read beyond the end of the array on the last ace iteration in RtlValidAcl.

Rob Shearman robertshearman at gmail.com
Sun Nov 29 04:28:32 CST 2009


---
 dlls/ntdll/sec.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

The loop needs to be iterated AceCount times plus one more time to
check that the last ace was in range. However, since ace is pointing
to past the last ace on the final iteration we don't want to access
any memory from it.

Fixes this Valgrind warning reported by Dan:
http://kegel.com/wine/valgrind/logs/2009-11-27-12.53/vg-advapi32_security.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ntdll-Don-t-read-beyond-the-end-of-the-array-on-the-.patch
Type: text/x-patch
Size: 549 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20091129/5912ea08/attachment.bin>


More information about the wine-patches mailing list