Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
6b514292
Commit
6b514292
authored
5 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/opus: move comment size check to ScanOneOpusTag()
Prepare for parsing large binary comments (such as METADATA_BLOCK_PICTURE).
parent
e2da13b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
OpusTags.cxx
src/decoder/plugins/OpusTags.cxx
+4
-3
No files found.
src/decoder/plugins/OpusTags.cxx
View file @
6b514292
...
...
@@ -45,6 +45,10 @@ ScanOneOpusTag(StringView name, StringView value,
ReplayGainInfo
*
rgi
,
TagHandler
&
handler
)
noexcept
{
if
(
value
.
size
>=
4096
)
/* ignore large values */
return
;
if
(
rgi
!=
nullptr
&&
name
.
EqualsIgnoreCase
(
"R128_TRACK_GAIN"
))
{
/* R128_TRACK_GAIN is a Q7.8 fixed point number in
dB */
...
...
@@ -97,9 +101,6 @@ ScanOpusTags(const void *data, size_t size,
if
(
s
==
nullptr
)
return
false
;
if
(
s
.
size
>=
4096
)
continue
;
const
auto
split
=
s
.
Split
(
'='
);
if
(
split
.
first
.
empty
()
||
split
.
second
.
IsNull
())
continue
;
...
...
This diff is collapsed.
Click to expand it.
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