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
c01a462c
Commit
c01a462c
authored
Oct 26, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rmdec: fix null derefercne
Fixes CID733714 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1bf50711
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
rmdec.c
libavformat/rmdec.c
+5
-2
No files found.
libavformat/rmdec.c
View file @
c01a462c
...
...
@@ -839,7 +839,8 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
ast
->
deint_id
==
DEINT_ID_VBRS
)
av_get_packet
(
pb
,
pkt
,
ast
->
sub_packet_lengths
[
ast
->
sub_packet_cnt
-
rm
->
audio_pkt_cnt
]);
else
{
av_new_packet
(
pkt
,
st
->
codec
->
block_align
);
if
(
av_new_packet
(
pkt
,
st
->
codec
->
block_align
)
<
0
)
return
AVERROR
(
ENOMEM
);
memcpy
(
pkt
->
data
,
ast
->
pkt
.
data
+
st
->
codec
->
block_align
*
//FIXME avoid this
(
ast
->
sub_packet_h
*
ast
->
audio_framesize
/
st
->
codec
->
block_align
-
rm
->
audio_pkt_cnt
),
st
->
codec
->
block_align
);
...
...
@@ -867,7 +868,9 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
if
(
rm
->
audio_pkt_cnt
)
{
// If there are queued audio packet return them first
st
=
s
->
streams
[
rm
->
audio_stream_num
];
ff_rm_retrieve_cache
(
s
,
s
->
pb
,
st
,
st
->
priv_data
,
pkt
);
res
=
ff_rm_retrieve_cache
(
s
,
s
->
pb
,
st
,
st
->
priv_data
,
pkt
);
if
(
res
<
0
)
return
res
;
flags
=
0
;
}
else
{
if
(
rm
->
old_format
)
{
...
...
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