Will someone rid me of this troublesome music player?
Posted on Fri 07 April 2006 by alex in geek
At work I'm a little limited on which music players I can use (basically it has to be one that compiles with the system libs of SuSE 10.0). I also want a player that has Audioscrobbler support. This has meant running beep-media-player which was quite stable although know is going through the motions of crashing every 1-10 songs. Looking at the core dump is pretty shocking:
(gdb) frame 5 #5 0x40fcc92f in readComments (fp=0x848ac88) at vorbis.c:58 58 *dp = '\0'; (gdb) l 53 fread(cToInt, 1, 4, fp); 54 fielddata->len = le2int(cToInt); 55 data = malloc(fielddata->len); 56 fread(data, 1, fielddata->len, fp); 57 dp = strchr(data, '='); 58 *dp = '\0'; 59 dp++; 60 fielddata->name = malloc(strlen(data) + 1); 61 fielddata->data = malloc(fielddata->len - strlen(data)); 62 *(fielddata->data + fielddata->len - strlen(data) - 1) = '\0'; (gdb) p dp $1 = (unsigned char *) 0x0
There are quite a number of failure points in those 10 lines where no checking is done of the results. I would go to the latest code but it seems beep (which itself is a fork) has forked twice since. This doesn't give me a warm feeling. I'm considering Quod Libet as it might give me a chance to play with python. However I'll have to get a working set of python-gstreamer bindings on this machine somehow.