diff options
author | 2003-07-29 14:46:06 +0000 | |
---|---|---|
committer | 2003-07-29 14:46:06 +0000 | |
commit | 7a6b91786191fe41493cf6d1317d1ac12cac950e (patch) | |
tree | 411886e996af4f7319430b952190f8d8cb1c942d /libexec/ftp-proxy/ftp-proxy.c | |
parent | add a spot of .Fa to variable names (diff) | |
download | wireguard-openbsd-7a6b91786191fe41493cf6d1317d1ac12cac950e.tar.xz wireguard-openbsd-7a6b91786191fe41493cf6d1317d1ac12cac950e.zip |
correctly handle multiline responses with leading space followed by number
PR3378 mayonez@ssnet.xim.pl, thanks!
Diffstat (limited to 'libexec/ftp-proxy/ftp-proxy.c')
-rw-r--r-- | libexec/ftp-proxy/ftp-proxy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ftp-proxy/ftp-proxy.c b/libexec/ftp-proxy/ftp-proxy.c index 054fe819f7a..387c3b51fc6 100644 --- a/libexec/ftp-proxy/ftp-proxy.c +++ b/libexec/ftp-proxy/ftp-proxy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.31 2003/06/28 01:04:57 deraadt Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.32 2003/07/29 14:46:06 henning Exp $ */ /* * Copyright (c) 1996-2001 @@ -861,6 +861,8 @@ do_server_reply(struct csiob *server, struct csiob *client) * Watch out for "227 Entering Passive Mode ..." replies */ code = strtol((char *)server->line_buffer, &p, 10); + if (isspace(server->line_buffer[0])) + code = 0; if (!*(server->line_buffer) || (*p != ' ' && *p != '-')) { if (continuing) goto sendit; |