Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e0d8ff5e
Commit
e0d8ff5e
authored
Apr 11, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/nsvdec: Use av_malloc_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
7f64a750
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
nsvdec.c
libavformat/nsvdec.c
+2
-2
No files found.
libavformat/nsvdec.c
View file @
e0d8ff5e
...
...
@@ -346,7 +346,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
nsv
->
index_entries
=
table_entries_used
;
if
((
unsigned
)
table_entries_used
>=
UINT_MAX
/
sizeof
(
uint32_t
))
return
-
1
;
nsv
->
nsvs_file_offset
=
av_malloc
((
unsigned
)
table_entries_used
*
sizeof
(
uint32_t
));
nsv
->
nsvs_file_offset
=
av_malloc
_array
((
unsigned
)
table_entries_used
,
sizeof
(
uint32_t
));
if
(
!
nsv
->
nsvs_file_offset
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -355,7 +355,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
if
(
table_entries
>
table_entries_used
&&
avio_rl32
(
pb
)
==
MKTAG
(
'T'
,
'O'
,
'C'
,
'2'
))
{
nsv
->
nsvs_timestamps
=
av_malloc
((
unsigned
)
table_entries_used
*
sizeof
(
uint32_t
));
nsv
->
nsvs_timestamps
=
av_malloc
_array
((
unsigned
)
table_entries_used
,
sizeof
(
uint32_t
));
if
(
!
nsv
->
nsvs_timestamps
)
return
AVERROR
(
ENOMEM
);
for
(
i
=
0
;
i
<
table_entries_used
;
i
++
)
{
...
...
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