]> diplodocus.org Git - nmh/blobdiff - uip/rcvdist.c
Added many flags to CFLAGS with gcc, if supported.
[nmh] / uip / rcvdist.c
index fcf9dd77943cbaf9ef1e1429047ccc818682e810..c6698865d7ad916a9809866aa19d65384b7385be 100644 (file)
@@ -171,7 +171,7 @@ main (int argc, char **argv)
     if ((tfile = m_mktemp2(NULL, invo_name, NULL, &fp)) == NULL) {
        die("unable to create temporary file in %s", get_temp_dir());
     }
-    strncpy (tmpfil, tfile, sizeof(tmpfil));
+    strncpy (tmpfil, tfile, sizeof(tmpfil) - 1);
 
     cpydata (fileno (stdin), fileno (fp), "message", tmpfil);
     fseek (fp, 0L, SEEK_SET);
@@ -179,7 +179,7 @@ main (int argc, char **argv)
     if ((tfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
        die("unable to create temporary file in %s", get_temp_dir());
     }
-    strncpy (drft, tfile, sizeof(tmpfil));
+    strncpy (drft, tfile, sizeof(drft) - 1);
 
     rcvdistout (fp, form, addrs);
     fclose (fp);
@@ -273,7 +273,7 @@ rcvdistout (FILE *inb, char *form, char *addrs)
        switch (state = m_getfld2(&gstate, name, tmpbuf, &msg_count)) {
            case FLD: 
            case FLDPLUS: 
-               i = fmt_addcomptext(name, tmpbuf);
+               i = fmt_addcomptext(name, tmpbuf);
                if (i != -1) {
                    char_read += msg_count;
                    while (state == FLDPLUS) {