memtrace: Fix pointer arithmetic of MemoryShadow::cover
Pointers have unsigned type thus casting them to intptr_t could lead to a negative value which in one part of the expression is being implicitly converted to size_t resulting in: nBlocks = big_positive_number - negative_number This rarely happens on x64 but would often happen on x32 resulting in memory access violation. Fixes: bac0ea03 Signed-off-by:Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Loading
Please register or sign in to comment