]> diplodocus.org Git - nmh/blobdiff - uip/dropsbr.c
Fix file descriptor leak in ruserpass()
[nmh] / uip / dropsbr.c
index 2d19f2196dd1ce88361bacab567586199f3ba93e..630de11181615b892b8c2d8bd7584455ed79ccc9 100644 (file)
@@ -7,6 +7,8 @@
 
 #include "h/nmh.h"
 #include "h/mh.h"
+#include "sbr/dtime.h"
+#include "sbr/strindex.h"
 #include "sbr/error.h"
 #include "h/utils.h"
 #include "h/dropsbr.h"
@@ -245,7 +247,7 @@ mbx_copy (char *mailbox, int mbx_style, int md, int fd,
                         * If there is already a "From " line,
                         * then leave it alone.  Else we add one.
                         */
-                       char tmpbuffer[sizeof buffer];
+                       char tmpbuffer[sizeof buffer-7];
                        char *tp, *ep;
 
                        strncpy(tmpbuffer, buffer, sizeof(tmpbuffer));