gentoo-overlay/media-video/gxine/files/gxine-0.5.906-playlist_segfault.patch

25 lines
784 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Fix segmentation fault in playlist wrt http://bugs.gentoo.org/390783 by Rafał Mużyło
--- src/playlist.c
+++ src/playlist.c
@@ -427,7 +427,7 @@ static int playlist_load (const char *fn
if (errno != ENOENT && (defaultfile || errno != ENOTDIR))
display_error (FROM_GXINE, _("Loading of playlist file failed."),
_("Failed to open file %s\n%s"), fname, strerror (errno));
- goto ret0;
+ goto ret1;
}
xml_parser_init_R (xml_parser_t *xml, plfile, st.st_size, XML_PARSER_CASE_INSENSITIVE);
@@ -524,9 +524,10 @@ static int playlist_load (const char *fn
return 1;
ret0:
- free (plfile);
xml_parser_free_tree (root);
xml_parser_finalize_R (xml);
+ free (plfile);
+ ret1:
if (defaultfile)
free ((char *)fname);
return ret;