mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-09 13:16:26 +00:00
Fix sanitizer pointer overflow warning when perform pointer arithmetic (#2098)
Convert the pointer to intptr_t to perform arithmetic to avoid the warning.
This commit is contained in:
parent
156318f0d4
commit
5c201995f1
|
@ -153,7 +153,7 @@ static void
|
||||||
adjust_ptr(uint8 **p_ptr, intptr_t offset)
|
adjust_ptr(uint8 **p_ptr, intptr_t offset)
|
||||||
{
|
{
|
||||||
if (*p_ptr)
|
if (*p_ptr)
|
||||||
*p_ptr += offset;
|
*p_ptr = (uint8 *)((intptr_t)(*p_ptr) + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue
Block a user