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
2a4c7994
Commit
2a4c7994
authored
Sep 04, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.17.x'
parents
333d226e
41487426
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
9 deletions
+27
-9
NEWS
NEWS
+1
-0
mpd.conf.5
doc/mpd.conf.5
+1
-1
compress.c
src/AudioCompress/compress.c
+7
-0
_ogg_common.c
src/decoder/_ogg_common.c
+8
-6
update_walk.c
src/update_walk.c
+10
-2
No files found.
NEWS
View file @
2a4c7994
...
...
@@ -20,6 +20,7 @@ ver 0.17.2 (2012/??/??)
* playlist: fix memory leak
* state_file: save song priorities
* player: disable cross-fading in "single" mode
* update: fix unsafe readlink() usage
ver 0.17.1 (2012/07/31)
...
...
doc/mpd.conf.5
View file @
2a4c7994
...
...
@@ -216,7 +216,7 @@ default is 5.
.TP
.B max_playlist_length <number>
This specifies the maximum number of songs that can be in the playlist. The
default is
4096
.
default is
16384
.
.TP
.B max_command_list_size <size in KiB>
This specifies the maximum size a command list can be. The default is 2048.
...
...
src/AudioCompress/compress.c
View file @
2a4c7994
...
...
@@ -33,6 +33,9 @@ struct Compressor {
struct
Compressor
*
Compressor_new
(
unsigned
int
history
)
{
struct
Compressor
*
obj
=
malloc
(
sizeof
(
struct
Compressor
));
if
(
obj
==
NULL
)
/* out of memory, not much we can do */
abort
();
obj
->
prefs
.
target
=
TARGET
;
obj
->
prefs
.
maxgain
=
GAINMAX
;
...
...
@@ -61,6 +64,10 @@ void Compressor_delete(struct Compressor *obj)
static
int
*
resizeArray
(
int
*
data
,
int
newsz
,
int
oldsz
)
{
data
=
realloc
(
data
,
newsz
*
sizeof
(
int
));
if
(
data
==
NULL
)
/* out of memory, not much we can do */
abort
();
if
(
newsz
>
oldsz
)
memset
(
data
+
oldsz
,
0
,
sizeof
(
int
)
*
(
newsz
-
oldsz
));
return
data
;
...
...
src/decoder/_ogg_common.c
View file @
2a4c7994
...
...
@@ -33,12 +33,14 @@ ogg_stream_type ogg_stream_type_detect(struct input_stream *inStream)
size_t
r
;
r
=
decoder_read
(
NULL
,
inStream
,
buf
,
sizeof
(
buf
));
if
(
r
>=
32
&&
memcmp
(
buf
,
"OggS"
,
4
)
==
0
&&
(
(
memcmp
(
buf
+
29
,
"FLAC"
,
4
)
==
0
&&
memcmp
(
buf
+
37
,
"fLaC"
,
4
)
==
0
)
||
(
memcmp
(
buf
+
28
,
"FLAC"
,
4
)
==
0
)
||
(
memcmp
(
buf
+
28
,
"fLaC"
,
4
)
==
0
)))
{
if
(
r
<
sizeof
(
buf
)
||
memcmp
(
buf
,
"OggS"
,
4
)
!=
0
)
return
VORBIS
;
if
((
memcmp
(
buf
+
29
,
"FLAC"
,
4
)
==
0
&&
memcmp
(
buf
+
37
,
"fLaC"
,
4
)
==
0
)
||
memcmp
(
buf
+
28
,
"FLAC"
,
4
)
==
0
||
memcmp
(
buf
+
28
,
"fLaC"
,
4
)
==
0
)
return
FLAC
;
}
return
VORBIS
;
}
src/update_walk.c
View file @
2a4c7994
...
...
@@ -283,12 +283,20 @@ skip_symlink(const struct directory *directory, const char *utf8_name)
return
true
;
char
buffer
[
MPD_PATH_MAX
];
ssize_t
ret
=
readlink
(
path_fs
,
buffer
,
sizeof
(
buffer
));
ssize_t
length
=
readlink
(
path_fs
,
buffer
,
sizeof
(
buffer
));
g_free
(
path_fs
);
if
(
ret
<
0
)
if
(
length
<
0
)
/* don't skip if this is not a symlink */
return
errno
!=
EINVAL
;
if
((
size_t
)
length
>=
sizeof
(
buffer
))
/* skip symlinks when the buffer is too small for the
link target */
return
true
;
/* null-terminate the buffer, because readlink() will not */
buffer
[
length
]
=
0
;
if
(
!
follow_inside_symlinks
&&
!
follow_outside_symlinks
)
{
/* ignore all symlinks */
return
true
;
...
...
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