Skip to content
Commit d107f89c authored by Danylo Piliaiev's avatar Danylo Piliaiev Committed by José Fonseca
Browse files

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: default avatarDanylo Piliaiev <danylo.piliaiev@globallogic.com>
parent 5777f1a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment