[gnome-calendar/gbsneto/open-files: 4/6] utils: Protect against NULL description




commit a080d8ec0f5b782d26fb849909311454d04a8ab8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Aug 16 15:27:19 2021 -0300

    utils: Protect against NULL description

 src/utils/gcal-utils.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/utils/gcal-utils.c b/src/utils/gcal-utils.c
index b1b76877..e57c064d 100644
--- a/src/utils/gcal-utils.c
+++ b/src/utils/gcal-utils.c
@@ -1292,6 +1292,9 @@ gcal_utils_extract_google_section (const gchar  *description,
   gchar *first_delimiter;
   gchar *last_delimiter;
 
+  if (!description)
+    goto out;
+
 #define GOOGLE_DELIMITER 
"-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-"
 
   description_len = strlen (description);


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