Fix Multiplication result converted to larger type from CodeQL

This commit is contained in:
Jasmine Iwanek
2022-12-23 14:22:17 -05:00
parent ecae3d7b31
commit 231cadb0a7
5 changed files with 12 additions and 12 deletions

View File

@@ -68,7 +68,7 @@ svga_render_blank(svga_t *svga)
}
uint32_t *line_ptr = &buffer32->line[svga->displine + svga->y_add][svga->x_add];
uint32_t line_width = (svga->hdisp + svga->scrollcache) * char_width * sizeof(uint32_t);
uint32_t line_width = (uint32_t) (svga->hdisp + svga->scrollcache) * char_width * sizeof(uint32_t);
memset(line_ptr, 0, line_width);
}