[gnome-builder] editorconfig: fix missing parameters check in upstream code



commit 2b837b2592bd2ff4c98058cb7190ac68bd7c4888
Author: Christian Hergert <christian hergert me>
Date:   Sat Oct 3 16:36:55 2015 -0700

    editorconfig: fix missing parameters check in upstream code

 contrib/libeditorconfig/ec_glob.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/contrib/libeditorconfig/ec_glob.c b/contrib/libeditorconfig/ec_glob.c
index 22182b8..767feb8 100644
--- a/contrib/libeditorconfig/ec_glob.c
+++ b/contrib/libeditorconfig/ec_glob.c
@@ -77,6 +77,9 @@ int ec_glob(const char *pattern, const char *string)
     UT_array *                nums;     /* number ranges */
     int                       ret = 0;
 
+    if (pattern == NULL || string == NULL)
+      return -1;
+
     strcpy(l_pattern, pattern);
     p_pcre = pcre_str + 1;
     pcre_str_end = pcre_str + 2 * PATTERN_MAX;


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