aboutsummaryrefslogtreecommitdiffstats
path: root/src/path.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-26 20:20:59 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-26 20:20:59 +0000
commit29df70366c807a671611720ad0419c6da1ac0e41 (patch)
tree61e2975a336efb2a1f76d7bacd42afe278252692 /src/path.h
parent3a1b3e3807609434bf3f392b6b1f66ac218e265c (diff)
downloadmpd-29df70366c807a671611720ad0419c6da1ac0e41.tar.gz
mpd-29df70366c807a671611720ad0419c6da1ac0e41.tar.xz
mpd-29df70366c807a671611720ad0419c6da1ac0e41.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. git-svn-id: https://svn.musicpd.org/mpd/trunk@7154 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/path.h')
0 files changed, 0 insertions, 0 deletions