aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-26 22:35:47 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-26 22:35:47 +0000
commitc0c0bac6573c2c89894d3ee20a9b01e452cea6fd (patch)
tree48257d227789ca59bf3d33e63635f22c9af8c626 /src/log.c
parente5a7c14227a2ca69e0e07ac9dc62d6e31f16121a (diff)
downloadmpd-c0c0bac6573c2c89894d3ee20a9b01e452cea6fd.tar.gz
mpd-c0c0bac6573c2c89894d3ee20a9b01e452cea6fd.tar.xz
mpd-c0c0bac6573c2c89894d3ee20a9b01e452cea6fd.zip
storedPlaylist: prevent potential DoS from stored playlist commands
While mpd has always protected against the infinite expansion of the main playlist by limiting its size in memory, however the new storedPlaylist code has never checked for this limit. Malicious (or clumsy) users could repeatedly append songs to stored playlists, causing files to grow increasingly large on disk. Attempting to load extremely large files into memory will require mpd to slurp that all into memory, and ultimately the file would be unusable by mpd because of the configurable playlist size limit. Now we limit stored playlists to the max_playlist_length configuration variable set by the user (default is 16384). We will refuse to append to playlist files if they hit that limit; and also refuse to load more than the specified amount of songs into memory. r7154 in trunk git-svn-id: https://svn.musicpd.org/mpd/branches/branch-0.13.0-fixes@7165 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/log.c')
0 files changed, 0 insertions, 0 deletions