diff options
author | 2005-11-17 13:32:05 +0000 | |
---|---|---|
committer | 2005-11-17 13:32:05 +0000 | |
commit | 4f154adaf2c5940e560e66c4ffb32d5f1b6c9c99 (patch) | |
tree | 081b1d0f503be53b499788782982e5bcb03502ac | |
parent | finally get around to documenting the alternate call to pkg_create. (diff) | |
download | wireguard-openbsd-4f154adaf2c5940e560e66c4ffb32d5f1b6c9c99.tar.xz wireguard-openbsd-4f154adaf2c5940e560e66c4ffb32d5f1b6c9c99.zip |
buffer overflow
-rw-r--r-- | usr.sbin/ftp-proxy/ftp-proxy.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c index 8e3d6cbed4d..faf0b77c16b 100644 --- a/usr.sbin/ftp-proxy/ftp-proxy.c +++ b/usr.sbin/ftp-proxy/ftp-proxy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.5 2005/06/07 14:12:07 camield Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.6 2005/11/17 13:32:05 deraadt Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl> @@ -174,11 +174,12 @@ client_parse_anon(struct session *s) { if (strcasecmp("USER ftp\r\n", linebuf) != 0 && strcasecmp("USER anonymous\r\n", linebuf) != 0) { - linelen = snprintf(linebuf, sizeof linebuf, + snprintf(linebuf, sizeof linebuf, "500 Only anonymous FTP allowed\r\n"); logmsg(LOG_DEBUG, "#%d proxy: %s", s->id, linebuf); /* Talk back to the client ourself. */ + linelen = strlen(linebuf); bufferevent_write(s->client_bufev, linebuf, linelen); /* Clear buffer so it's not sent to the server. */ |