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
84aea80f
Commit
84aea80f
authored
May 06, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oggparsevorbis.c: Check for OOM when using av_mallocz.
parent
517dcc9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
oggparsevorbis.c
libavformat/oggparsevorbis.c
+2
-0
No files found.
libavformat/oggparsevorbis.c
View file @
84aea80f
...
...
@@ -223,6 +223,8 @@ vorbis_header (AVFormatContext * s, int idx)
priv
->
len
[
pkt_type
>>
1
]
=
os
->
psize
;
priv
->
packet
[
pkt_type
>>
1
]
=
av_mallocz
(
os
->
psize
);
if
(
!
priv
->
packet
[
pkt_type
>>
1
])
return
AVERROR
(
ENOMEM
);
memcpy
(
priv
->
packet
[
pkt_type
>>
1
],
os
->
buf
+
os
->
pstart
,
os
->
psize
);
if
(
os
->
buf
[
os
->
pstart
]
==
1
)
{
const
uint8_t
*
p
=
os
->
buf
+
os
->
pstart
+
7
;
/* skip "\001vorbis" tag */
...
...
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