[MPlayer-dev-eng] [PATCH] get_path() SIGSEGV
Martin Oberzalek
kingleo at gmx.at
Tue Jan 6 20:33:35 CET 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Yesterday I reported this bug:
http://mplayerhq.hu/pipermail/mplayer-users/2004-January/041452.html
In short words:
When $HOME is not set get_path() returns NULL and mplayer crashes.
This patch fixes the bug. All other parts of mplayer calling get_path() are
NULL pointer aware.
#######################################
- --- mplayer.c 8 Dec 2003 21:33:31 -0000 1.741
+++ mplayer.c 6 Jan 2004 19:11:09 -0000
@@ -1630,7 +1630,8 @@
add_subtitles (sub_name[i], sh_video->fps, 0);
}
if(sub_auto) { // auto load sub file ...
- - char **tmp = sub_filenames(get_path("sub/"), filename);
+ char *psub = get_path( "sub/" );
+ char **tmp = sub_filenames( (psub ? psub : ""), filename);
char **tmp2 = tmp;
while (*tmp2)
add_subtitles (*tmp2++, sh_video->fps, 0);
########################################
Greetins, Martin!
- --
King Leo's page: http://kingleo.pages.at
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/+w2U5U8mm6JL7oYRAsm+AJ9yUFr4XvsfNZ1MKUBNqQd+OTFDCACeOD8P
k8Iyt4p+OvlMibgC8a/tuqQ=
=OVQ3
-----END PGP SIGNATURE-----
More information about the MPlayer-dev-eng
mailing list