Menu

#1 out of bound array access in unsafe FastHashFunction.Of

open
nobody
None
5
2007-03-30
2007-03-30
Mathias
No

case 3U and 1U in the final switch of FastHashFunction.Of function read array data out of bounds as dataPtr is first cast to ushort* before being dereferenced when reading the last byte of the array.

This triggers no error as there is no bound check in unsafe mode and, due to memory alignment, a memory fault cannot occurs, but this is definitely not the way the function should behave.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB