[Flac-dev] XMMS plugin: string handling bugs
Josh Coalson
xflac at yahoo.com
Thu Sep 1 22:01:47 PDT 2005
OK, I think I've fixed all the pointer problems with the
"new" http streaming code in CVS.
Josh
--- Christian Weisgerber <naddy at mips.inka.de> wrote:
> There are problems in the configure option handling code for http
> streaming that was added to the XMMS plugin for 1.1.2.
>
> In configure.c, flac_cfg.stream.proxy_host and other pointers to
> strings are initialized with pointers to an empty string "".
> Subsequent code in FLAC_XMMS__init() and flac_configurewin_ok()
> passes these pointers to g_free(). Since they don't point to memory
> that was ever allocated through malloc(), what happens next is
> undefined.
>
> I guess on the author's system free() silently copes. With some
> malloc debugging (malloc.conf -> A on BSD systems), free() will
> abort().
>
> I tried initializing the pointers to NULL, but that resulted at
> least in one assert from Gtk, so there is both code that assumes
> that the pointers point to something and code that assumes the
> memory can be free()ed. For the time being, I added some extra
> initializations like
>
> flac_cfg.stream.proxy_host = g_strdup("");
>
> to FLAC_XMMS__init(), but somebody familiar with the code (Steven
> Richman?) ought to clean this up.
>
> --
> Christian "naddy" Weisgerber
> naddy at mips.inka.de
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
More information about the Flac-dev
mailing list