Commit d3f6f2a2 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

mlv_play: fix memory allocation for some FIO_ReadFile calls (fio_malloc)

--HG--
branch : crop_rec_4k
parent b9d9438af05b
......@@ -1001,7 +1001,7 @@ static mlv_xref_hdr_t *mlv_play_load_index(char *base_filename)
/* we should check the MLVI header for matching UID value to make sure its the right index... */
if(!memcmp(buf.blockType, "XREF", 4))
{
block_hdr = malloc(buf.blockSize);
block_hdr = fio_malloc(buf.blockSize);
if(FIO_ReadFile(in_file, block_hdr, buf.blockSize) != (int32_t)buf.blockSize)
{
......@@ -1914,7 +1914,7 @@ static void mlv_play_mlv(char *filename, FILE **chunk_files, uint32_t chunk_coun
int mem_size = (buffer->frameSize + 0x1000) & ~0xFFF;
/* keep in mind the address must be aligned, alloc a few k more */
mlv_play_decomp_buf = malloc(mem_size + 0x1000);
mlv_play_decomp_buf = fio_malloc(mem_size + 0x1000);
if(!mlv_play_decomp_buf)
{
bmp_printf(FONT_MED, 20, 100, "failed to alloc mlv_play_decomp_buf");
......
Supports Markdown
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