Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3-0]: src/libexec/ftpd Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/df88c1962893
branches:  netbsd-3-0
changeset: 579500:df88c1962893
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Sep 18 19:15:04 2008 +0000

description:
Pull up following revision(s) (requested by lukem in ticket #1960):
        libexec/ftpd/ftpd.c: revision 1.173
Make sure that "su" is initialized before dereferencing it.
Fixes Coverity CID 1075.
Ok by lukem@.

diffstat:

 libexec/ftpd/ftpd.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r da9988f9d2ca -r df88c1962893 libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c       Thu Sep 18 19:13:44 2008 +0000
+++ b/libexec/ftpd/ftpd.c       Thu Sep 18 19:15:04 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpd.c,v 1.164.2.1.2.2 2008/09/18 19:13:44 bouyer Exp $        */
+/*     $NetBSD: ftpd.c,v 1.164.2.1.2.3 2008/09/18 19:15:04 bouyer Exp $        */
 
 /*
  * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
 #if 0
 static char sccsid[] = "@(#)ftpd.c     8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: ftpd.c,v 1.164.2.1.2.2 2008/09/18 19:13:44 bouyer Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.164.2.1.2.3 2008/09/18 19:15:04 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -2384,11 +2384,12 @@
                ispassive = 1;
                goto printaddr;
        } else if (usedefault == 0) {
+               su = (struct sockinet *)&data_dest;
+
                if (epsvall) {
                        reply(0, "EPSV only mode (EPSV ALL)");
                        goto epsvonly;
                }
-               su = (struct sockinet *)&data_dest;
  printaddr:
                                                        /* PASV/PORT */
                if (su->su_family == AF_INET) {



Home | Main Index | Thread Index | Old Index