summaryrefslogtreecommitdiff
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2002-01-30 17:14:30 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2002-01-30 17:14:30 +0000
commitaa7bad31c0be209909d7d67e47d02a03e85dee89 (patch)
treeb53420c924ca63323ea09c4b8e3754ab887b6083 /libexec/ftpd
parentf3f5188fb43d61ba89fc3629e1c272402166067e (diff)
protect `RNTO` from NULL pointer.
millert@ ok
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpcmd.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index a5f358c6bb9..fdab995915a 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpcmd.y,v 1.35 2002/01/25 06:43:37 mpech Exp $ */
+/* $OpenBSD: ftpcmd.y,v 1.36 2002/01/30 17:14:29 mpech Exp $ */
/* $NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $ */
/*
@@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
-static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.35 2002/01/25 06:43:37 mpech Exp $";
+static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.36 2002/01/30 17:14:29 mpech Exp $";
#endif
#endif /* not lint */
@@ -409,7 +409,7 @@ cmd
}
| RNTO check_login SP pathname CRLF
{
- if ($2) {
+ if ($2 && $4 != NULL) {
if (fromname) {
renamecmd(fromname, $4);
free(fromname);