[gnome-builder] editorconfig: also check pattern length against PATTERN_MAX
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editorconfig: also check pattern length against PATTERN_MAX
- Date: Sat, 3 Oct 2015 23:51:25 +0000 (UTC)
commit 98004a139e9f672c2da9de4c0bab6a37517091af
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]