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
b1834681
Commit
b1834681
authored
Apr 16, 2015
by
Thomas Guillem
Committed by
Luca Barbato
Apr 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flac: fix realloc loop with invalid flac files
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
2cc39365
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
flac_parser.c
libavcodec/flac_parser.c
+9
-0
No files found.
libavcodec/flac_parser.c
View file @
b1834681
...
@@ -565,6 +565,15 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
...
@@ -565,6 +565,15 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
nb_desired
*
FLAC_AVG_FRAME_SIZE
);
nb_desired
*
FLAC_AVG_FRAME_SIZE
);
}
}
if
(
!
av_fifo_space
(
fpc
->
fifo_buf
)
&&
av_fifo_size
(
fpc
->
fifo_buf
)
/
FLAC_AVG_FRAME_SIZE
>
fpc
->
nb_headers_buffered
*
10
)
{
/* There is less than one valid flac header buffered for 10 headers
* buffered. Therefore the fifo is most likely filled with invalid
* data and the input is not a flac file. */
goto
handle_error
;
}
/* Fill the buffer. */
/* Fill the buffer. */
if
(
av_fifo_realloc2
(
fpc
->
fifo_buf
,
if
(
av_fifo_realloc2
(
fpc
->
fifo_buf
,
(
read_end
-
read_start
)
+
av_fifo_size
(
fpc
->
fifo_buf
))
<
0
)
{
(
read_end
-
read_start
)
+
av_fifo_size
(
fpc
->
fifo_buf
))
<
0
)
{
...
...
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