Skip to content

Fix issues with boundary access. #6019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 6, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed possible NULL dereference
  • Loading branch information
akallabeth committed Apr 2, 2020
commit 58dc36b3c883fd460199cedb6d30e58eba58298c
5 changes: 3 additions & 2 deletions libfreerdp/cache/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,12 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings)
bitmapCache->settings = settings;
bitmapCache->update = ((freerdp*)settings->instance)->update;
bitmapCache->context = bitmapCache->update->context;
bitmapCache->maxCells = settings->BitmapCacheV2NumCells;
bitmapCache->cells = (BITMAP_V2_CELL*)calloc(bitmapCache->maxCells, sizeof(BITMAP_V2_CELL));
bitmapCache->cells =
(BITMAP_V2_CELL*)calloc(settings->BitmapCacheV2NumCells, sizeof(BITMAP_V2_CELL));

if (!bitmapCache->cells)
goto fail;
bitmapCache->maxCells = settings->BitmapCacheV2NumCells;

for (i = 0; i < (int)bitmapCache->maxCells; i++)
{
Expand Down