[MPlayer-cvslog] r22421 - trunk/stream/stream_dvd.c
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Mar 3 14:34:39 CET 2007
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" ???
Greetings,
Reimar Döffinger
More information about the MPlayer-cvslog
mailing list