Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
bdd8e02b
Commit
bdd8e02b
authored
Jan 31, 2016
by
Kieran Kunhya
Committed by
James Darnley
Feb 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/cfhd: Make sure we have an end of header tag before allocating a frame.
Fixes tickets #5208 and #5209
parent
9effa012
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
cfhd.c
libavcodec/cfhd.c
+8
-1
No files found.
libavcodec/cfhd.c
View file @
bdd8e02b
...
...
@@ -224,7 +224,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
GetByteContext
gb
;
ThreadFrame
frame
=
{
.
f
=
data
};
AVFrame
*
pic
=
data
;
int
ret
=
0
,
i
,
j
,
plane
;
int
ret
=
0
,
i
,
j
,
plane
,
got_buffer
=
0
;
int16_t
*
coeff_data
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P10
;
...
...
@@ -426,6 +426,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
s
->
coded_width
=
0
;
s
->
coded_height
=
0
;
got_buffer
=
1
;
}
coeff_data
=
s
->
plane
[
s
->
channel_num
].
subband
[
s
->
subband_num_actual
];
...
...
@@ -557,6 +558,12 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
goto
end
;
}
if
(
!
got_buffer
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"No end of header tag found
\n
"
);
ret
=
AVERROR
(
EINVAL
);
goto
end
;
}
for
(
plane
=
0
;
plane
<
3
&&
!
ret
;
plane
++
)
{
/* level 1 */
int
lowpass_height
=
s
->
plane
[
plane
].
band
[
0
][
0
].
height
;
...
...
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