[gnome-builder/gnome-builder-3-18] editorconfig: also check pattern length against PATTERN_MAX
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-18] editorconfig: also check pattern length against PATTERN_MAX
- Date: Tue, 13 Oct 2015 07:36:22 +0000 (UTC)
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]