Package: playmp3list Version: 0.95-4.1+b1 Followup-For: Bug #300803
The attached patch fixes this. -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.28 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages playmp3list depends on: ii libc6 2.7-18 GNU C Library: Shared libraries ii libgcc1 1:4.3.2-1.1 GCC support library ii libncurses5 5.7+20081220-1 shared libraries for terminal hand ii libstdc++6 4.3.2-1.1 The GNU Standard C++ Library v3 ii mpg321 [mpg123] 0.2.10.6 mpg123 clone that doesn't use floa playmp3list recommends no packages. playmp3list suggests no packages. -- no debconf information
>From 38f00cfa350f01bc9921186a988c0525acd0d162 Mon Sep 17 00:00:00 2001 From: Rabin Vincent <ra...@rab.in> Date: Sat, 10 Jan 2009 16:11:22 +0530 Subject: [PATCH] Fix crash on opening directory with playlist without extension --- playlist.cc | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/playlist.cc b/playlist.cc index d6db5a9..640ad76 100644 --- a/playlist.cc +++ b/playlist.cc @@ -159,11 +159,15 @@ mp3playlist::add_item(char *plist_entry, bool pID3v1) return result; break; case FT_PLAYLIST : ext = strrchr(plist_entry,'.'); - shortname = new char[ext-plist_entry+1]; - strncpy(shortname,plist_entry,ext-plist_entry); - shortname[ext-plist_entry] = '\0'; + if (ext) + { + shortname = new char[ext-plist_entry+1]; + strncpy(shortname,plist_entry,ext-plist_entry); + shortname[ext-plist_entry] = '\0'; + } + else shortname = plist_entry; result = add_item(plist_entry, shortname, FT_PLAYLIST); - delete[] shortname; + if (ext) delete[] shortname; return result; break; case FT_OTHER : -- 1.5.6.5