commit | 0d156b94876c6139e56b05bc8476412f070b56ff | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Fri Apr 01 12:27:04 2022 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Fri Apr 01 12:27:04 2022 +0200 |
tree | 07647dd0f3c02ab76624d0be97255daff332bfe6 | |
parent | 892deefce238af52043e35cc5251226da87200b5 [diff] |
parser lyb BUGFIX too large malloc
diff --git a/src/parser_lyb.c b/src/parser_lyb.c index 25295ef..db68205 100644 --- a/src/parser_lyb.c +++ b/src/parser_lyb.c
@@ -353,7 +353,7 @@ } /* module name */ - *mod_name = malloc((length + 1) * sizeof *mod_name); + *mod_name = malloc(length + 1); LY_CHECK_ERR_RET(!*mod_name, LOGMEM(lybctx->ctx), LY_EMEM); lyb_read(((uint8_t *)*mod_name), length, lybctx); (*mod_name)[length] = '\0';