]> diplodocus.org Git - nmh/blobdiff - sbr/folder_pack.c
Tell make that uip/mhical.c depends on sbr/icalparse.h
[nmh] / sbr / folder_pack.c
index 6a2b95098b29456a558f30987dab7a34b53d45e9..7fdfcf8536d9aa34bf9b49f73005831ac7f2ac5b 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "m_name.h"
 #include "seq_setcur.h"
 #include "ext_hook.h"
 #include "folder_realloc.h"
 #include "seq_setcur.h"
 #include "ext_hook.h"
 #include "folder_realloc.h"
@@ -48,8 +49,8 @@ folder_pack (struct msgs **mpp, int verbose)
     for (msgnum = mp->lowmsg, hole = 1; msgnum <= mp->hghmsg; msgnum++) {
        if (does_exist (mp, msgnum)) {
            if (msgnum != hole) {
     for (msgnum = mp->lowmsg, hole = 1; msgnum <= mp->hghmsg; msgnum++) {
        if (does_exist (mp, msgnum)) {
            if (msgnum != hole) {
-               strncpy (newmsg, m_name (hole), sizeof(newmsg));
-               strncpy (oldmsg, m_name (msgnum), sizeof(oldmsg));
+               strncpy (newmsg, m_name (hole), sizeof(newmsg) - 1);
+               strncpy (oldmsg, m_name (msgnum), sizeof(oldmsg) - 1);
                if (verbose)
                    printf ("message %s becomes %s\n", oldmsg, newmsg);
 
                if (verbose)
                    printf ("message %s becomes %s\n", oldmsg, newmsg);