[gnome-builder/gnome-builder-3-18] editorconfig: also check pattern length against PATTERN_MAX



commit f6c53e02805f5d573ca4154484f7ffc9955cb968
Author: Christian Hergert <christian hergert me>
Date:   Sat Oct 3 16:51:17 2015 -0700

    editorconfig: also check pattern length against PATTERN_MAX

 contrib/libeditorconfig/ec_glob.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/contrib/libeditorconfig/ec_glob.c b/contrib/libeditorconfig/ec_glob.c
index 767feb8..5dcfe9c 100644
--- a/contrib/libeditorconfig/ec_glob.c
+++ b/contrib/libeditorconfig/ec_glob.c
@@ -77,7 +77,7 @@ int ec_glob(const char *pattern, const char *string)
     UT_array *                nums;     /* number ranges */
     int                       ret = 0;
 
-    if (pattern == NULL || string == NULL)
+    if (pattern == NULL || string == NULL || (strlen (pattern) > PATTERN_MAX))
       return -1;
 
     strcpy(l_pattern, pattern);


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