aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-05-20 20:23:20 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-05-20 20:23:20 +0800
commit5352cbb678ba2b4a40b767565a52cf24794dfeac (patch)
tree3743730441cfb54acb2261dc20e3d2400025f0af
parent7d42ed47286e7456068937dfb24335fe4bb9f74a (diff)
downloadgsoc2013-evolution-5352cbb678ba2b4a40b767565a52cf24794dfeac.tar
gsoc2013-evolution-5352cbb678ba2b4a40b767565a52cf24794dfeac.tar.gz
gsoc2013-evolution-5352cbb678ba2b4a40b767565a52cf24794dfeac.tar.bz2
gsoc2013-evolution-5352cbb678ba2b4a40b767565a52cf24794dfeac.tar.lz
gsoc2013-evolution-5352cbb678ba2b4a40b767565a52cf24794dfeac.tar.xz
gsoc2013-evolution-5352cbb678ba2b4a40b767565a52cf24794dfeac.tar.zst
gsoc2013-evolution-5352cbb678ba2b4a40b767565a52cf24794dfeac.zip
check the string returned by gnome_vfs_uri_to_string, which can be empty.
2002-05-20 Rodrigo Moya <rodrigo@ximian.com> * 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
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/pcs/cal-backend-file.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 543c1cda0b..c5bbcfa5ee 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-20 Rodrigo Moya <rodrigo@ximian.com>
+
+ * 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.
+
2002-05-17 JP Rosevear <jpr@ximian.com>
* gui/gnome-cal.c (gnome_calendar_setup_view_menus): set the view
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");