#18 Fix null pointer dereference when playing a file

closed-accepted
nobody
None
5
2014-08-14
2007-04-28
Ari Pollak
No

I got a report of a crash in mplayerplug-in 3.40 when going to http://www.deejay.it/dj/programma?idProgramma=11 and attempting to click one of the speaker icons below to play a song. (The original bug report is at http://bugs.debian.org/421177\)
Here is the backtrace from the crash:
#0 0x00002b8d199bc159 in raise () from /lib/libpthread.so.0
#1 0x000000000044d504 in ?? ()
#2 <signal handler called>
#3 0x00002aaaadadceaa in playPlaylist (td=<value optimized out>)
at Source/plugin-threads.cpp:1749
#4 0x00002b8d199b4425 in start_thread () from /lib/libpthread.so.0
#5 0x00002b8d1bd30e6d in clone () from /lib/libc.so.6
#6 0x0000000000000000 in ?? ()

Here is a patch which seems to fix the problem for me. This was a wild guess at what the mistake was, so I could be wrong.

--- mplayerplug-in-3.40.orig/Source/plugin-threads.cpp
+++ mplayerplug-in-3.40/Source/plugin-threads.cpp
@@ -1746,7 +1746,7 @@
i);

// if the play count is exactly 1 then tell mplayer to loop continuously > and to use the same frame buffer (should eliminate blinking)
- if (i == 1 || local_list->loop == 1) {
+ if (i == 1 || local_td->instance->loop == 1) {
loop_single = 1;
local_td->argv[argc++] = strdup("-loop");
snprintf(buffer, 32, "%i", local_td->instance->loop);

Discussion

  • Kevin DeKorte

    Kevin DeKorte - 2007-05-02
    • status: open --> closed-accepted
     
  • Kevin DeKorte

    Kevin DeKorte - 2007-05-02

    Logged In: YES
    user_id=685413
    Originator: NO

    accepted and patched... in CVS as of May 2, 2007

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks