[evolution-patches] Patch for #43079 (shell)
- From: Ettore Perazzoli <ettore ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Patch for #43079 (shell)
- Date: 15 May 2003 12:53:00 -0400
This protects against the user giving an invalid "default:" pseudo-URI
on the command line.
-- Ettore
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1273
diff -u -p -r1.1273 ChangeLog
--- ChangeLog 15 May 2003 15:21:17 -0000 1.1273
+++ ChangeLog 15 May 2003 16:50:34 -0000
@@ -1,5 +1,13 @@
2003-05-15 Ettore Perazzoli <ettore ximian com>
+ * e-shell.c (parse_default_uri): Protect against the component
+ name having slashes in it.
+
+ * e-shell-view.c (display_uri): Protect against invalid "default:"
+ URIs. [#43079]
+
+2003-05-15 Ettore Perazzoli <ettore ximian com>
+
[Patch from Antonio Xu <antonio xu sun com>, #42491]
* e-config-upgrade.c (upgrade_xml_1_2_rec): Make it compile on
Index: e-shell-view.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-view.c,v
retrieving revision 1.284
diff -u -p -r1.284 e-shell-view.c
--- e-shell-view.c 14 May 2003 18:39:21 -0000 1.284
+++ e-shell-view.c 15 May 2003 16:50:34 -0000
@@ -2448,7 +2448,7 @@ display_uri (EShellView *shell_view,
View *view;
gboolean retval;
const char *view_info;
- char *real_uri;
+ char *real_uri = NULL;
char *allocated_uri = NULL;
priv = shell_view->priv;
@@ -2476,6 +2476,11 @@ display_uri (EShellView *shell_view,
if (strncmp (uri, E_SHELL_DEFAULTURI_PREFIX, E_SHELL_DEFAULTURI_PREFIX_LEN) == 0) {
allocated_uri = evolution_uri_for_default_uri (e_shell_view_get_shell (shell_view), uri);
+ if (allocated_uri == NULL) {
+ retval = FALSE;
+ goto end;
+ }
+
uri = allocated_uri;
}
Index: e-shell.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell.c,v
retrieving revision 1.214
diff -u -p -r1.214 e-shell.c
--- e-shell.c 14 May 2003 18:39:22 -0000 1.214
+++ e-shell.c 15 May 2003 16:50:35 -0000
@@ -2167,6 +2167,11 @@ parse_default_uri (EShell *shell,
else
component = g_strndup (component_start, p - component_start);
+ if (strchr (component, '/') != NULL) {
+ g_free (component);
+ return FALSE;
+ }
+
client = gconf_client_get_default ();
config_path = g_strdup_printf ("/apps/evolution/shell/default_folders/%s_path", component);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]