[evolution-ews/gnome-3-8] Fix segfault: set text as NULL when both g_strrstr() fails



commit 76c4d4ee328694a922408a9b510bf2027c3917b8
Author: Fabiano Fidêncio <fidencio redhat com>
Date:   Thu Jun 20 14:48:28 2013 +0200

    Fix segfault: set text as NULL when both g_strrstr() fails

 src/server/e-ews-oof-settings.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/server/e-ews-oof-settings.c b/src/server/e-ews-oof-settings.c
index ce5c7ea..7273a8d 100644
--- a/src/server/e-ews-oof-settings.c
+++ b/src/server/e-ews-oof-settings.c
@@ -246,6 +246,8 @@ ews_oof_settings_get_response_cb (ESoapResponse *response,
                text = ews_oof_settings_text_from_html (string);
        else if (g_strrstr (string, "BodyFragment") != NULL)
                text = ews_oof_settings_text_from_html (string);
+       else
+               text = NULL;
        e_ews_oof_settings_set_internal_reply (settings, text ? text : "");
        g_free (string);
        g_free (text);
@@ -261,6 +263,8 @@ ews_oof_settings_get_response_cb (ESoapResponse *response,
                text = ews_oof_settings_text_from_html (string);
        else if (g_strrstr (string, "BodyFragment") != NULL)
                text = ews_oof_settings_text_from_html (string);
+       else
+               text = NULL;
        e_ews_oof_settings_set_external_reply (settings, text ? text : "");
        g_free (string);
        g_free (text);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]