Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
magic-lantern
magic-lantern
Commits
1f1893130ae9
Commit
d3f6f2a2
authored
Aug 16, 2017
by
alex@thinkpad
Browse files
mlv_play: fix memory allocation for some FIO_ReadFile calls (fio_malloc)
--HG-- branch : crop_rec_4k
parent
b9d9438af05b
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/mlv_play/mlv_play.c
View file @
1f189313
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment