summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-03-13 17:34:43 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-03-13 17:34:43 +0000
commitad44be95f7a5ef9274c5a84127de4ed475670a94 (patch)
tree35cd185ee65003733a39c330a462233f486f9581 /usr.bin/ssh
parent3d98e377a7cadb3d67aedf1855a04198db9fb5fb (diff)
missing xfree, deny key on parse error; ok stevesk@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/auth-options.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/ssh/auth-options.c b/usr.bin/ssh/auth-options.c
index 57e335f3f19..bfb1af86b32 100644
--- a/usr.bin/ssh/auth-options.c
+++ b/usr.bin/ssh/auth-options.c
@@ -10,7 +10,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-options.c,v 1.13 2001/02/09 13:38:07 markus Exp $");
+RCSID("$OpenBSD: auth-options.c,v 1.14 2001/03/13 17:34:42 markus Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -118,7 +118,9 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
file, linenum);
packet_send_debug("%.100s, line %lu: missing end quote",
file, linenum);
- continue;
+ xfree(forced_command);
+ forced_command = NULL;
+ goto bad_option;
}
forced_command[i] = 0;
packet_send_debug("Forced command: %.900s", forced_command);
@@ -148,7 +150,8 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
file, linenum);
packet_send_debug("%.100s, line %lu: missing end quote",
file, linenum);
- continue;
+ xfree(s);
+ goto bad_option;
}
s[i] = 0;
packet_send_debug("Adding to environment: %.900s", s);
@@ -185,7 +188,8 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
file, linenum);
packet_send_debug("%.100s, line %lu: missing end quote",
file, linenum);
- continue;
+ xfree(patterns);
+ goto bad_option;
}
patterns[i] = 0;
opts++;