1. 29 Jan, 2008 1 commit
  2. 26 Jan, 2008 2 commits
    • Eric Wong's avatar
      storedPlaylist: prevent potential DoS from stored playlist commands · 29df7036
      Eric Wong authored
      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
      29df7036
    • Max Kellermann's avatar
      fixed -Wshadow warnings · 07adb14e
      Max Kellermann authored
      Signed-off-by: 's avatarEric Wong <normalperson@yhbt.net>
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      07adb14e
  3. 03 Jan, 2008 1 commit
    • Eric Wong's avatar
      Cleanup #includes of standard system headers and put them in one place · cb8f1af3
      Eric Wong authored
      This will make refactoring features easier, especially now that
      pthreads support and larger refactorings are on the horizon.
      
      Hopefully, this will make porting to other platforms (even
      non-UNIX-like ones for masochists) easier, too.
      
      os_compat.h will house all the #includes for system headers
      considered to be the "core" of MPD.  Headers for optional
      features will be left to individual source files.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      cb8f1af3
  4. 01 Jan, 2008 7 commits
  5. 28 Dec, 2007 1 commit
    • Eric Wong's avatar
      Merge branches/ew r7104 · b79f6b88
      Eric Wong authored
      thread-safety work in preparation for rewrite to use pthreads
      
      Expect no regressions against trunk (r7078), possibly minor
      performance improvements in update (due to fewer heap
      allocations), but increased stack usage.
      
      Applied the following patches:
      
      * maxpath_str for reentrancy (temporary fix, reverted)
      * path: start working on thread-safe variants of these methods
      * Re-entrancy work on path/character-set conversions
      * directory.c: exploreDirectory() use reentrant functions here
      * directory/update: more use of reentrant functions + cleanups
      * string_toupper: a strdup-less version of strDupToUpper
      * get_song_url: a static-variable-free version of getSongUrl()
      * Use reentrant/thread-safe get_song_url everywhere
      * replace rmp2amp with the reentrant version, rmp2amp_r
      * Get rid of the non-reentrant/non-thread-safe rpp2app, too.
      * buffer2array: assert strdup() returns a usable value in unit tests
      * replace utf8ToFsCharset and fsCharsetToUtf8 with thread-safe variants
      * fix storing playlists w/o absolute paths
      * parent_path(), a reentrant version of parentPath()
      * parentPath => parent_path for reentrancy and thread-safety
      * allow "make test" to automatically run embedded unit tests
      * remove convStrDup() and maxpath_str()
      * use MPD_PATH_MAX everywhere instead of MAXPATHLEN
      * path: get rid of appendSlash, pfx_path and just use pfx_dir
      * get_song_url: fix the ability to play songs in the top-level music_directory
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7106 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      b79f6b88
  6. 26 May, 2007 4 commits
  7. 25 May, 2007 1 commit
  8. 24 May, 2007 2 commits
  9. 16 May, 2007 2 commits