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
6ff01cc7
Commit
6ff01cc7
authored
Mar 07, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.19.x'
parents
031410c7
e140a280
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
23 deletions
+41
-23
NEWS
NEWS
+8
-0
Iso9660ArchivePlugin.cxx
src/archive/plugins/Iso9660ArchivePlugin.cxx
+26
-17
DsdiffDecoderPlugin.cxx
src/decoder/plugins/DsdiffDecoderPlugin.cxx
+1
-1
OpusReader.hxx
src/decoder/plugins/OpusReader.hxx
+1
-1
PulseMixerPlugin.cxx
src/mixer/plugins/PulseMixerPlugin.cxx
+1
-1
ArgParser.cxx
src/protocol/ArgParser.cxx
+3
-2
HugeAllocator.cxx
src/util/HugeAllocator.cxx
+1
-1
No files found.
NEWS
View file @
6ff01cc7
...
@@ -52,6 +52,14 @@ ver 0.20 (not yet released)
...
@@ -52,6 +52,14 @@ ver 0.20 (not yet released)
* update
* update
- apply .mpdignore matches to subdirectories
- apply .mpdignore matches to subdirectories
ver 0.19.14 (not yet released)
* decoder
- dsdiff: fix off-by-one buffer overflow
- opus: limit tag size to 64 kB
* archive
- iso9660: fix buffer overflow
* fix build failures on non-glibc builds due to constexpr Mutex
ver 0.19.13 (2016/02/23)
ver 0.19.13 (2016/02/23)
* tags
* tags
- aiff, riff: fix ID3 chunk padding
- aiff, riff: fix ID3 chunk padding
...
...
src/archive/plugins/Iso9660ArchivePlugin.cxx
View file @
6ff01cc7
...
@@ -65,7 +65,11 @@ public:
...
@@ -65,7 +65,11 @@ public:
return
iso9660_iso_seek_read
(
iso
,
ptr
,
start
,
i_size
);
return
iso9660_iso_seek_read
(
iso
,
ptr
,
start
,
i_size
);
}
}
void
Visit
(
const
char
*
path
,
ArchiveVisitor
&
visitor
);
/**
* @param capacity the path buffer size
*/
void
Visit
(
char
*
path
,
size_t
length
,
size_t
capacity
,
ArchiveVisitor
&
visitor
);
virtual
void
Close
()
override
{
virtual
void
Close
()
override
{
Unref
();
Unref
();
...
@@ -83,32 +87,36 @@ static constexpr Domain iso9660_domain("iso9660");
...
@@ -83,32 +87,36 @@ static constexpr Domain iso9660_domain("iso9660");
/* archive open && listing routine */
/* archive open && listing routine */
inline
void
inline
void
Iso9660ArchiveFile
::
Visit
(
const
char
*
psz_path
,
ArchiveVisitor
&
visitor
)
Iso9660ArchiveFile
::
Visit
(
char
*
path
,
size_t
length
,
size_t
capacity
,
ArchiveVisitor
&
visitor
)
{
{
CdioList_t
*
entlist
;
auto
*
entlist
=
iso9660_ifs_readdir
(
iso
,
path
);
CdioListNode_t
*
entnode
;
iso9660_stat_t
*
statbuf
;
char
pathname
[
4096
];
entlist
=
iso9660_ifs_readdir
(
iso
,
psz_path
);
if
(
!
entlist
)
{
if
(
!
entlist
)
{
return
;
return
;
}
}
/* Iterate over the list of nodes that iso9660_ifs_readdir gives */
/* Iterate over the list of nodes that iso9660_ifs_readdir gives */
CdioListNode_t
*
entnode
;
_CDIO_LIST_FOREACH
(
entnode
,
entlist
)
{
_CDIO_LIST_FOREACH
(
entnode
,
entlist
)
{
statbuf
=
(
iso9660_stat_t
*
)
_cdio_list_node_data
(
entnode
);
auto
*
statbuf
=
(
iso9660_stat_t
*
)
_cdio_list_node_data
(
entnode
);
const
char
*
filename
=
statbuf
->
filename
;
if
(
strcmp
(
filename
,
"."
)
==
0
||
strcmp
(
filename
,
".."
)
==
0
)
continue
;
size_t
filename_length
=
strlen
(
filename
);
if
(
length
+
filename_length
+
1
>=
capacity
)
/* file name is too long */
continue
;
strcpy
(
pathname
,
psz_path
);
memcpy
(
path
+
length
,
filename
,
filename_length
+
1
);
s
trcat
(
pathname
,
statbuf
->
filename
)
;
s
ize_t
new_length
=
length
+
filename_length
;
if
(
iso9660_stat_s
::
_STAT_DIR
==
statbuf
->
type
)
{
if
(
iso9660_stat_s
::
_STAT_DIR
==
statbuf
->
type
)
{
if
(
strcmp
(
statbuf
->
filename
,
"."
)
&&
strcmp
(
statbuf
->
filename
,
".."
))
{
memcpy
(
path
+
new_length
,
"/"
,
2
);
strcat
(
pathname
,
"/"
);
Visit
(
path
,
new_length
+
1
,
capacity
,
visitor
);
Visit
(
pathname
,
visitor
);
}
}
else
{
}
else
{
//remove leading /
//remove leading /
visitor
.
VisitArchiveEntry
(
path
name
+
1
);
visitor
.
VisitArchiveEntry
(
path
+
1
);
}
}
}
}
_cdio_list_free
(
entlist
,
true
);
_cdio_list_free
(
entlist
,
true
);
...
@@ -132,7 +140,8 @@ iso9660_archive_open(Path pathname, Error &error)
...
@@ -132,7 +140,8 @@ iso9660_archive_open(Path pathname, Error &error)
void
void
Iso9660ArchiveFile
::
Visit
(
ArchiveVisitor
&
visitor
)
Iso9660ArchiveFile
::
Visit
(
ArchiveVisitor
&
visitor
)
{
{
Visit
(
"/"
,
visitor
);
char
path
[
4096
]
=
"/"
;
Visit
(
path
,
1
,
sizeof
(
path
),
visitor
);
}
}
/* single archive handling */
/* single archive handling */
...
...
src/decoder/plugins/DsdiffDecoderPlugin.cxx
View file @
6ff01cc7
...
@@ -205,7 +205,7 @@ dsdiff_handle_native_tag(InputStream &is,
...
@@ -205,7 +205,7 @@ dsdiff_handle_native_tag(InputStream &is,
if
(
length
==
0
||
length
>
60
)
if
(
length
==
0
||
length
>
60
)
return
;
return
;
char
string
[
length
];
char
string
[
length
+
1
];
char
*
label
;
char
*
label
;
label
=
string
;
label
=
string
;
...
...
src/decoder/plugins/OpusReader.hxx
View file @
6ff01cc7
...
@@ -85,7 +85,7 @@ public:
...
@@ -85,7 +85,7 @@ public:
char
*
ReadString
()
{
char
*
ReadString
()
{
uint32_t
length
;
uint32_t
length
;
if
(
!
ReadWord
(
length
))
if
(
!
ReadWord
(
length
)
||
length
>=
65536
)
return
nullptr
;
return
nullptr
;
const
char
*
src
=
(
const
char
*
)
Read
(
length
);
const
char
*
src
=
(
const
char
*
)
Read
(
length
);
...
...
src/mixer/plugins/PulseMixerPlugin.cxx
View file @
6ff01cc7
...
@@ -213,7 +213,7 @@ PulseMixer::SetVolume(unsigned new_volume, Error &error)
...
@@ -213,7 +213,7 @@ PulseMixer::SetVolume(unsigned new_volume, Error &error)
struct
pa_cvolume
cvolume
;
struct
pa_cvolume
cvolume
;
pa_cvolume_set
(
&
cvolume
,
volume
.
channels
,
pa_cvolume_set
(
&
cvolume
,
volume
.
channels
,
(
pa_volume_t
)
new_volume
*
PA_VOLUME_NORM
/
100
+
0.5
);
(
new_volume
*
PA_VOLUME_NORM
+
50
)
/
100
);
bool
success
=
pulse_output_set_volume
(
output
,
&
cvolume
,
error
);
bool
success
=
pulse_output_set_volume
(
output
,
&
cvolume
,
error
);
if
(
success
)
if
(
success
)
volume
=
cvolume
;
volume
=
cvolume
;
...
...
src/protocol/ArgParser.cxx
View file @
6ff01cc7
...
@@ -78,7 +78,7 @@ ParseCommandArgRange(const char *s)
...
@@ -78,7 +78,7 @@ ParseCommandArgRange(const char *s)
throw
FormatProtocolError
(
ACK_ERROR_ARG
,
throw
FormatProtocolError
(
ACK_ERROR_ARG
,
"Number is negative: %s"
,
s
);
"Number is negative: %s"
,
s
);
if
(
unsigned
(
value
)
>
std
::
numeric_limits
<
unsigned
>::
max
())
if
(
value
>
std
::
numeric_limits
<
int
>::
max
())
throw
FormatProtocolError
(
ACK_ERROR_ARG
,
throw
FormatProtocolError
(
ACK_ERROR_ARG
,
"Number too large: %s"
,
s
);
"Number too large: %s"
,
s
);
...
@@ -99,7 +99,8 @@ ParseCommandArgRange(const char *s)
...
@@ -99,7 +99,8 @@ ParseCommandArgRange(const char *s)
throw
FormatProtocolError
(
ACK_ERROR_ARG
,
throw
FormatProtocolError
(
ACK_ERROR_ARG
,
"Number is negative: %s"
,
s
);
"Number is negative: %s"
,
s
);
if
(
unsigned
(
value
)
>
std
::
numeric_limits
<
unsigned
>::
max
())
if
(
value
>
std
::
numeric_limits
<
int
>::
max
())
throw
FormatProtocolError
(
ACK_ERROR_ARG
,
throw
FormatProtocolError
(
ACK_ERROR_ARG
,
"Number too large: %s"
,
s
);
"Number too large: %s"
,
s
);
...
...
src/util/HugeAllocator.cxx
View file @
6ff01cc7
...
@@ -46,7 +46,7 @@ static size_t
...
@@ -46,7 +46,7 @@ static size_t
AlignToPageSize
(
size_t
size
)
AlignToPageSize
(
size_t
size
)
{
{
static
const
long
page_size
=
sysconf
(
_SC_PAGESIZE
);
static
const
long
page_size
=
sysconf
(
_SC_PAGESIZE
);
if
(
page_size
>
0
)
if
(
page_size
==
0
)
return
size
;
return
size
;
size_t
ps
(
page_size
);
size_t
ps
(
page_size
);
...
...
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