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
31dc73e9
Commit
31dc73e9
authored
Feb 02, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vorbisdec: Check memory allocations
parent
ec17782e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
vorbisdec.c
libavcodec/vorbisdec.c
+9
-4
No files found.
libavcodec/vorbisdec.c
View file @
31dc73e9
...
...
@@ -369,10 +369,15 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc)
}
// Weed out unused vlcs and build codevector vector
codebook_setup
->
codevectors
=
used_entries
?
av_mallocz
(
used_entries
*
codebook_setup
->
dimensions
*
sizeof
(
*
codebook_setup
->
codevectors
))
:
NULL
;
if
(
used_entries
)
{
codebook_setup
->
codevectors
=
av_mallocz
(
used_entries
*
codebook_setup
->
dimensions
*
sizeof
(
*
codebook_setup
->
codevectors
));
if
(
!
codebook_setup
->
codevectors
)
return
AVERROR
(
ENOMEM
);
}
else
codebook_setup
->
codevectors
=
NULL
;
for
(
j
=
0
,
i
=
0
;
i
<
entries
;
++
i
)
{
unsigned
dim
=
codebook_setup
->
dimensions
;
...
...
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