]> diplodocus.org Git - nmh/blobdiff - uip/dropsbr.c
Fix file descriptor leak in ruserpass()
[nmh] / uip / dropsbr.c
index cc44c8d472399c42cd130cd2b8f426dca15911f0..630de11181615b892b8c2d8bd7584455ed79ccc9 100644 (file)
@@ -5,12 +5,15 @@
  * complete copyright information.
  */
 
  * complete copyright information.
  */
 
-#include <h/nmh.h>
-#include <h/mh.h>
-#include <h/utils.h>
-#include <h/dropsbr.h>
-#include <h/mts.h>
-#include <h/tws.h>
+#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"
+#include "h/mts.h"
+#include "h/tws.h"
 #include "sbr/lock_file.h"
 #include "sbr/m_mktemp.h"
 #include <fcntl.h>
 #include "sbr/lock_file.h"
 #include "sbr/m_mktemp.h"
 #include <fcntl.h>
@@ -244,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.
                         */
                         * 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));
                        char *tp, *ep;
 
                        strncpy(tmpbuffer, buffer, sizeof(tmpbuffer));