]> diplodocus.org Git - nmh/blobdiff - uip/dropsbr.c
One final fix to test-attach-detach.
[nmh] / uip / dropsbr.c
index 7dc0a87be17ffdf140518e875cabd5b91ad7e99b..2cf5b598d6415d92c7053e49739f0bea0d0e6c38 100644 (file)
@@ -306,6 +306,10 @@ mbx_copy (char *mailbox, int mbx_style, int md, int fd,
            }
                    
            while ((i = read (fd, buffer, sizeof(buffer))) > 0) {
+                /* valgrind noticed that stringdex depends on null
+                   termination. */
+                buffer[i] = '\0';
+
                for (j = 0;
                        (j = stringdex (mmdlm1, buffer)) >= 0;
                        buffer[j]++)