Skip to content

Commit

Permalink
Merge pull request #7 from sincos2854/master
Browse files Browse the repository at this point in the history
Fix handling of decoding errors
  • Loading branch information
uyjulian committed Mar 19, 2023
2 parents 2960d1e + 4aaa1d5 commit a447dde
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extractor.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ int getBMPFromAVIF(const uint8_t *input_data, size_t file_size,
if (!bitmap_data)
{
LocalFree(*h_bitmap_data);
*h_bitmap_data = NULL;
goto cleanup;
}
rgb.pixels = bitmap_data;
Expand Down Expand Up @@ -116,6 +117,7 @@ int getBMPFromAVIF(const uint8_t *input_data, size_t file_size,
if (NULL == bitmap_info_header)
{
LocalFree(*h_bitmap_info);
*h_bitmap_info = NULL;
goto cleanup;
}

Expand Down

0 comments on commit a447dde

Please sign in to comment.