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
da7e31a2
Commit
da7e31a2
authored
Feb 01, 2015
by
Hugo Beauzée-Luyssen
Committed by
Vittorio Giovara
Feb 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rmdec: Check memory allocations from ff_rm_alloc_rmstream()
Bug-Id: CID 1257835
parent
d89e58f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
rdt.c
libavformat/rdt.c
+2
-0
rmdec.c
libavformat/rmdec.c
+6
-0
No files found.
libavformat/rdt.c
View file @
da7e31a2
...
...
@@ -434,6 +434,8 @@ rdt_parse_sdp_line (AVFormatContext *s, int st_index,
rdt
->
nb_rmst
=
count
;
}
rdt
->
rmst
[
s
->
streams
[
n
]
->
index
]
=
ff_rm_alloc_rmstream
();
if
(
!
rdt
->
rmst
[
s
->
streams
[
n
]
->
index
])
return
AVERROR
(
ENOMEM
);
rdt_load_mdpr
(
rdt
,
s
->
streams
[
n
],
(
n
-
first
)
*
2
);
}
}
...
...
libavformat/rmdec.c
View file @
da7e31a2
...
...
@@ -109,6 +109,8 @@ static void rm_read_metadata(AVFormatContext *s, AVIOContext *pb, int wide)
RMStream
*
ff_rm_alloc_rmstream
(
void
)
{
RMStream
*
rms
=
av_mallocz
(
sizeof
(
RMStream
));
if
(
!
rms
)
return
NULL
;
rms
->
curpic_num
=
-
1
;
return
rms
;
}
...
...
@@ -416,6 +418,8 @@ static int rm_read_header_old(AVFormatContext *s)
if
(
!
st
)
return
-
1
;
st
->
priv_data
=
ff_rm_alloc_rmstream
();
if
(
!
st
->
priv_data
)
return
AVERROR
(
ENOMEM
);
return
rm_read_audio_stream_info
(
s
,
s
->
pb
,
st
,
st
->
priv_data
,
1
);
}
...
...
@@ -493,6 +497,8 @@ static int rm_read_header(AVFormatContext *s)
get_str8
(
pb
,
buf
,
sizeof
(
buf
));
/* mimetype */
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_DATA
;
st
->
priv_data
=
ff_rm_alloc_rmstream
();
if
(
!
st
->
priv_data
)
return
AVERROR
(
ENOMEM
);
if
(
ff_rm_read_mdpr_codecdata
(
s
,
s
->
pb
,
st
,
st
->
priv_data
,
avio_rb32
(
pb
))
<
0
)
return
-
1
;
...
...
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