commit | 99c71645512e2db270424c117b327c0d4d7ccaa1 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Fri Jul 03 13:33:36 2020 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Fri Jul 03 13:33:36 2020 +0200 |
tree | 205e45ef909f8b5ef39f7fb87e4d689f1ecd9685 | |
parent | 0d55bc3fffa10ef40d794fe6479c2e1c4834569a [diff] [blame] |
xpath BUGFIX wrong malloc size
diff --git a/src/xpath.c b/src/xpath.c index f527f72..a096674 100644 --- a/src/xpath.c +++ b/src/xpath.c
@@ -2934,7 +2934,7 @@ /* the ending 0 as well */ ++j; - dup->repeat[i] = malloc(j * sizeof *dup->repeat); + dup->repeat[i] = malloc(j * sizeof **dup->repeat); LY_CHECK_ERR_GOTO(!dup->repeat[i], LOGMEM(ctx), error); memcpy(dup->repeat[i], exp->repeat[i], j * sizeof **dup->repeat); dup->repeat[i][j - 1] = 0;