X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/017a82124bf2ea39ced5aa4c8f969c18b3c2fb90..7036a59145b61979bfd61344d55ac9ce36cc4d54:/uip/msh.c diff --git a/uip/msh.c b/uip/msh.c index 2769c240..6bb6f06d 100644 --- a/uip/msh.c +++ b/uip/msh.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #ifdef HAVE_TERMIOS_H @@ -754,7 +754,7 @@ setup (char *file) if (!(mp = (struct msgs *) calloc ((size_t) 1, sizeof(*mp)))) padios (NULL, "unable to allocate folder storage"); - if (!(mp->msgstats = calloc ((size_t) 1, msgp + 3))) + if (!(mp->msgstats = calloc ((size_t) msgp + 3, sizeof(*(mp->msgstats))))) padios (NULL, "unable to allocate message status storage"); mp->hghmsg = msgp;