Signed-off-by: Jan Friesse <[email protected]>
---
exec/coroparse.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/exec/coroparse.c b/exec/coroparse.c
index 0015861..af4072d 100644
--- a/exec/coroparse.c
+++ b/exec/coroparse.c
@@ -330,6 +330,10 @@ static int parse_section(FILE *fp,
loc--;
*loc = '\0';
+ if (strlen(path) + strlen(section) + 1 >=
ICMAP_KEYNAME_MAXLEN) {
+ *error_string = "parser error: Start of section
makes total cmap path too long";
+ return -1;
+ }
strcpy(new_keyname, path);
if (strcmp(path, "") != 0) {
strcat(new_keyname, ".");
@@ -355,6 +359,10 @@ static int parse_section(FILE *fp,
key = remove_whitespace(line, 1);
value = remove_whitespace(loc, 0);
+ if (strlen(path) + strlen(key) + 1 >=
ICMAP_KEYNAME_MAXLEN) {
+ *error_string = "parser error: New key makes
total cmap path too long";
+ return -1;
+ }
strcpy(new_keyname, path);
if (strcmp(path, "") != 0) {
strcat(new_keyname, ".");
--
1.7.1
_______________________________________________
discuss mailing list
[email protected]
http://lists.corosync.org/mailman/listinfo/discuss