[MPlayer-cvslog] r22421 - trunk/stream/stream_dvd.c

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat Mar 3 14:45:39 CET 2007


Reimar Döffinger wrote:
> Hello,
> On Sat, Mar 03, 2007 at 02:16:31PM +0100, nicodvb wrote:
> 
>>     if(!strcmp(dvd_device, "/dev/rdiskN")) {
>>       int i;
>>-      char *temp_device = malloc(strlen(dvd_device)+1);
>>+      size_t len = strlen(dvd_device);
>>+      char *temp_device = malloc(len);
>> 
>>       for (i = 1; i < 10; i++) {
>>-        sprintf(temp_device, "/dev/rdisk%d", i);
>>+        snprintf(temp_device, len, "/dev/rdisk%d", i);
> 
> 
> Was this tested? In this block, dvd_device is "/dev/rdiskN", so len is
> 11, thus temp_device will always be "/dev/rdisk" ???
> 

right, I'm sorry; I applied the wrong patch. Fixed

-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users




More information about the MPlayer-cvslog mailing list