]> git.wh0rd.org Git - nano.git/commitdiff
add missing memory corruption fix to do_statusbar_output()
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Fri, 14 Jan 2005 04:13:45 +0000 (04:13 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Fri, 14 Jan 2005 04:13:45 +0000 (04:13 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/winio.c

index f5db448467f515de40a85d8ae2713f864c04dd3f..601d6d401e4c5bb89fbedac4dc01b6d528f5f204 100644 (file)
@@ -1941,7 +1941,8 @@ void do_statusbar_output(char *output, size_t output_len, bool
        i += char_buf_len;
 
        /* More dangerousness fun =) */
-       answer = charealloc(answer, statusbar_xend + char_buf_len + 1);
+       answer = charealloc(answer, statusbar_xend +
+               (char_buf_len * 2));
 
        assert(statusbar_x <= statusbar_xend);