From 30a66c14300c855c2b504fb1f6bdcfcbce5de668 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Fri, 26 Nov 2004 22:33:04 +0000 Subject: Correct a potential segmentation fault. --- www/gnome-user-share/files/patch-user_share.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'www/gnome-user-share') diff --git a/www/gnome-user-share/files/patch-user_share.c b/www/gnome-user-share/files/patch-user_share.c index 20be2b00b78f..75fcdc3984f7 100644 --- a/www/gnome-user-share/files/patch-user_share.c +++ b/www/gnome-user-share/files/patch-user_share.c @@ -1,5 +1,5 @@ --- user_share.c.orig Fri Nov 26 04:33:51 2004 -+++ user_share.c Fri Nov 26 17:12:13 2004 ++++ user_share.c Fri Nov 26 17:24:31 2004 @@ -59,6 +59,14 @@ return -1; } @@ -24,3 +24,15 @@ int i; gint status; char *pid_filename; +@@ -195,9 +203,9 @@ + str = gconf_client_get_string (client, + FILE_SHARING_REQUIRE_PASSWORD, NULL); + +- if (strcmp (str, "never") == 0) { ++ if (str && strcmp (str, "never") == 0) { + /* Do nothing */ +- } else if (strcmp (str, "on_write") == 0){ ++ } else if (str && strcmp (str, "on_write") == 0){ + argv[i++] = "-D"; + argv[i++] = "RequirePasswordOnWrite"; + } else { -- cgit v1.2.3