[MPlayer-dev-eng] [PATCH] !IMPORTANT! some bugs in the osd menu
Christian Ohm
chr.ohm at gmx.net
Wed Jan 8 23:59:54 CET 2003
On Tuesday, 24 December 2002 at 3:04, Christian Ohm wrote:
> now this patch should work.
> --
> A computer scientist is someone who fixes things that aren't broken.
> Index: libmenu/menu_filesel.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmenu/menu_filesel.c,v
> retrieving revision 1.4
> diff -u -r1.4 menu_filesel.c
> --- libmenu/menu_filesel.c 4 Dec 2002 23:41:04 -0000 1.4
> +++ libmenu/menu_filesel.c 24 Dec 2002 01:59:10 -0000
> @@ -92,7 +92,7 @@
>
> static int mylstat(char *dir, char *file,struct stat* st) {
> int l = strlen(dir) + strlen(file);
> - char s[l+1];
> + char s[l+2];
> sprintf(s,"%s/%s",dir,file);
> return lstat(s,st);
> }
> @@ -175,6 +175,7 @@
> }
> while(n--) {
> e = calloc(1,sizeof(list_entry_t));
> + e->p.next = NULL;
> e->p.txt = strdup(namelist[n]);
> if(strchr(namelist[n], '/') != NULL)
> e->d = 1;
i noticed that someone applied my first patch (with the 'free(e)'). please
remove that patch and apply this one instead. e is appended to a list, and
when it is freed here, the list gets corrupted and mplayer segfaults. with
this patch the osd menu fileselection works perfectly for me.
bye,
christian ohm
--
I'm a creationist; I refuse to believe that I could have evolved from man.
More information about the MPlayer-dev-eng
mailing list