We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e7fe8a commit 2402725Copy full SHA for 2402725
shallow.c
@@ -534,7 +534,7 @@ static uint32_t *paint_alloc(struct paint_info *info)
534
unsigned nr = DIV_ROUND_UP(info->nr_bits, 32);
535
unsigned size = nr * sizeof(uint32_t);
536
void *p;
537
- if (!info->pool_count || size > info->end - info->free) {
+ if (!info->pool_count || info->end < info->free + size) {
538
if (size > POOL_SIZE)
539
BUG("pool size too small for %d in paint_alloc()",
540
size);
0 commit comments