diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-05-25 02:36:12 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-05-25 02:36:12 +0800 |
commit | 179927c70bd9d1dab99acfcb4f4a22112facedf1 (patch) | |
tree | 29cb17e84330dfd07c901475197c1b71ac232207 /calendar/pcs | |
parent | 2da4da2fa8ba00fad416634ecbb32d11a503c00c (diff) | |
download | gsoc2013-evolution-179927c70bd9d1dab99acfcb4f4a22112facedf1.tar gsoc2013-evolution-179927c70bd9d1dab99acfcb4f4a22112facedf1.tar.gz gsoc2013-evolution-179927c70bd9d1dab99acfcb4f4a22112facedf1.tar.bz2 gsoc2013-evolution-179927c70bd9d1dab99acfcb4f4a22112facedf1.tar.lz gsoc2013-evolution-179927c70bd9d1dab99acfcb4f4a22112facedf1.tar.xz gsoc2013-evolution-179927c70bd9d1dab99acfcb4f4a22112facedf1.tar.zst gsoc2013-evolution-179927c70bd9d1dab99acfcb4f4a22112facedf1.zip |
check the value returned by gnome_vfs_uri_to_string before using it.
2002-05-24 Rodrigo Moya <rodrigo@ximian.com>
* pcs/cal-backend-file.c (save): check the value returned by
gnome_vfs_uri_to_string before using it.
(cal_backend_file_open): ditto.
svn path=/trunk/; revision=17008
Diffstat (limited to 'calendar/pcs')
-rw-r--r-- | calendar/pcs/cal-backend-file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c index 599c09b465..ad15d0433c 100644 --- a/calendar/pcs/cal-backend-file.c +++ b/calendar/pcs/cal-backend-file.c @@ -284,6 +284,8 @@ save (CalBackendFile *cbfile) g_assert (priv->icalcomp != NULL); uri = gnome_vfs_uri_new (priv->uri); + if (!uri) + goto error; /* Make a backup copy of the file if it exists */ tmp = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE); @@ -883,7 +885,8 @@ 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) { + if (!str_uri || !strlen (str_uri)) { + g_free (str_uri); gnome_vfs_uri_unref (uri); return CAL_BACKEND_OPEN_ERROR; } |