Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hugo Beauzée-Luyssen
flac
Commits
4f47b63e
Commit
4f47b63e
authored
Apr 08, 2017
by
Erik de Castro Lopo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_decoder.c: Fix a memory leak
Leak reported by Secunia Research.
parent
25b2d82f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/libFLAC/stream_decoder.c
src/libFLAC/stream_decoder.c
+3
-0
No files found.
src/libFLAC/stream_decoder.c
View file @
4f47b63e
...
...
@@ -1753,6 +1753,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
}
memset
(
obj
->
comments
[
i
].
entry
,
0
,
obj
->
comments
[
i
].
length
)
;
if
(
!
FLAC__bitreader_read_byte_block_aligned_no_crc
(
decoder
->
private_
->
input
,
obj
->
comments
[
i
].
entry
,
obj
->
comments
[
i
].
length
))
{
/* Current i-th entry is bad, so we delete it. */
free
(
obj
->
comments
[
i
].
entry
)
;
obj
->
comments
[
i
].
entry
=
NULL
;
obj
->
num_comments
=
i
;
goto
skip
;
}
...
...
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