src/nnn.c | 6 +++--- diff --git a/src/nnn.c b/src/nnn.c index 1c12e1cdb17f13c129a7ba5fd64dc71bbcfe1964..bd342362ab76b8061b81bf338c20cc07e3197ed3 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -2721,9 +2721,9 @@ } static void archive_selection(const char *cmd, const char *archive, const char *curpath) { - /* The 70 comes from the string below */ - char *buf = (char *)malloc((70 + xstrlen(cmd) + xstrlen(archive) - + xstrlen(curpath) + xstrlen(selpath)) * sizeof(char)); + /* The 38 comes from the format string below */ + char *buf = malloc((38 + xstrlen(cmd) + xstrlen(archive) + + xstrlen(curpath) + xstrlen(selpath)) * sizeof(char)); if (!buf) { DPRINTF_S(strerror(errno)); printwarn(NULL);