From 5352cbb678ba2b4a40b767565a52cf24794dfeac Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Mon, 20 May 2002 12:23:20 +0000 Subject: check the string returned by gnome_vfs_uri_to_string, which can be empty. 2002-05-20 Rodrigo Moya * pcs/cal-backend-file.c (cal_backend_file_open): check the string returned by gnome_vfs_uri_to_string, which can be empty. If so, return an error. svn path=/trunk/; revision=16940 --- calendar/pcs/cal-backend-file.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'calendar/pcs') diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c index cccac9a633..599c09b465 100644 --- a/calendar/pcs/cal-backend-file.c +++ b/calendar/pcs/cal-backend-file.c @@ -883,6 +883,10 @@ cal_backend_file_open (CalBackend *backend, const char *uristr, gboolean only_if | GNOME_VFS_URI_HIDE_HOST_NAME | GNOME_VFS_URI_HIDE_HOST_PORT | GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD)); + if (!str_uri) { + gnome_vfs_uri_unref (uri); + return CAL_BACKEND_OPEN_ERROR; + } /* Load! */ file = fopen (str_uri, "r"); -- cgit v1.2.3