]> git.sesse.net Git - betaftpd/blobdiff - ftpd.c
Fixed a security problem where the custom snprintf() would always be used. Thanks...
[betaftpd] / ftpd.c
diff --git a/ftpd.c b/ftpd.c
index a7234f8789dd073182e1fc019de00a24f8683cdb..f013777ec65dcb39a3660f5234baa79a143fe005 100644 (file)
--- a/ftpd.c
+++ b/ftpd.c
@@ -215,7 +215,7 @@ int sendfile_supported = 1;
  */
 int time_to_check = 1;
 
-#ifndef HAVE_SPRINTF
+#ifndef HAVE_SNPRINTF
 /*
  * snprintf(): snprintf() replacement for systems that miss it. Note
  *             that this implementation does _not_ necessarily protect
@@ -446,7 +446,9 @@ struct ftran *alloc_new_ftran(const int sock, const struct conn * const c)
 #endif
 
        f->dir_listing = 0;
+#if WANT_UPLOAD
        f->upload = 0;
+#endif
        return f;
 }