# HG changeset patch # User nenolod # Date 1138628667 28800 # Node ID adee87ebe853a86a3cd129d1e9b5456a5676b11f # Parent 5a8f8c28871a0a3c4fe7b915cecb9d73661f05d0 [svn] Sanity checking inside vfs_() functions. diff -r 5a8f8c28871a -r adee87ebe853 libaudacious/vfs_gnome.c --- a/libaudacious/vfs_gnome.c Sun Jan 29 14:17:45 2006 -0800 +++ b/libaudacious/vfs_gnome.c Mon Jan 30 05:44:27 2006 -0800 @@ -48,6 +48,9 @@ GnomeVFSOpenMode g_mode; gboolean truncate, append; + if (!path || !mode) + return NULL; + file = g_new(VFSFile, 1); mode_to_gnome_vfs(mode, &g_mode, &truncate, &append); diff -r 5a8f8c28871a -r adee87ebe853 libaudacious/vfs_stdio.c --- a/libaudacious/vfs_stdio.c Sun Jan 29 14:17:45 2006 -0800 +++ b/libaudacious/vfs_stdio.c Mon Jan 30 05:44:27 2006 -0800 @@ -38,6 +38,9 @@ { VFSFile *file; + if (!path || !mode) + return NULL; + file = g_new(VFSFile, 1); file->handle = fopen(path, mode);