Commit 27c4c64c authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntdll: Avoid integer overflow in block_get_subheap().

parent 74e0c4ce
......@@ -359,7 +359,7 @@ static inline void block_set_type( struct block *block, UINT type )
static inline SUBHEAP *block_get_subheap( const struct heap *heap, const struct block *block )
{
char *offset = ROUND_ADDR( block, REGION_ALIGN - 1 );
void *base = offset - block->base_offset * REGION_ALIGN;
void *base = offset - (SIZE_T)block->base_offset * REGION_ALIGN;
if (base != (void *)heap) return base;
else return (SUBHEAP *)&heap->subheap;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment