]> git.sesse.net Git - betaftpd/blobdiff - cmds.c
Fixed a security problem where the custom snprintf() would always be used. Thanks...
[betaftpd] / cmds.c
diff --git a/cmds.c b/cmds.c
index e1fe248f1cb3c5c9626119a619b95430e24c8830..2e38823ab9d4716ae5c2f6aae5805e513c819fca 100644 (file)
--- a/cmds.c
+++ b/cmds.c
@@ -1079,6 +1079,7 @@ int long_listing(char * const retbuf, const char * const pathname, const int do_
        }
 
        strcpy(retbuf, temp);
+       return 1;
 }
 
 /*
@@ -1605,9 +1606,7 @@ void parse_command(struct conn *c)
                                        }
                                }       
                                
-                               if (c->free_me) {
-                                       destroy_conn(c);
-                               } else {
+                               if (!c->free_me) {
                                        c->recv_buf[cmlen] = schar;
 #if !WANT_NONROOT
                                        if (h->do_setuid) {