[MPlayer-users] Problem with uncleared buffers in "cue://" handler

Linards Ticmanis ticmanis at gmx.de
Sat May 21 17:20:42 CEST 2011


The function cue_find_bin() in stream/stream_cue.c fails to zero the
buffers it uses, which leads to problems with previous memory content
messing up the path that is being built. I propose this change to fix
the problem:

> --- stream/stream_cue.c (revision 33473)
> +++ stream/stream_cue.c (working copy)
> @@ -179,6 +179,10 @@
>    char t[256];
>    int fd_bin;
>  
> +  memset(bin_filename, 0, sizeof bin_filename);
> +  memset(s, 0, sizeof s);
> +  memset(t, 0, sizeof t);
> +
>    /* get the filename out of that */
>    /*                      12345 6  */
>    mp_msg (MSGT_OPEN,MSGL_INFO, "[bincue] cue_find_bin(%s)\n", firstline);
> (END) 


-- 
Linards Ticmanis


More information about the MPlayer-users mailing list