diff options
author | Damien Miller <djm@mindrot.org> | 2013-02-12 11:02:46 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-02-12 11:02:46 +1100 |
commit | d6d9fa0281e4856c40d5f03ebe4a5cb6a98337e3 (patch) | |
tree | 5b17408c715e7ec22294f0ea5899dd2b77195677 /sftp.c | |
parent | 18de9133c223cf820688659903de6d1ffc9873b2 (diff) | |
download | openssh-git-d6d9fa0281e4856c40d5f03ebe4a5cb6a98337e3.tar.gz |
- djm@cvs.openbsd.org 2013/02/08 00:41:12
[sftp.c]
fix NULL deref when built without libedit and control characters
entered as command; debugging and patch from Iain Morgan an
Loganaden Velvindron in bz#1956
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.141 2012/10/05 12:34:39 markus Exp $ */ +/* $OpenBSD: sftp.c,v 1.142 2013/02/08 00:41:12 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -1145,7 +1145,7 @@ parse_args(const char **cpp, int *pflag, int *rflag, int *lflag, int *iflag, /* Figure out which command we have */ for (i = 0; cmds[i].c != NULL; i++) { - if (strcasecmp(cmds[i].c, argv[0]) == 0) + if (argv[0] != NULL && strcasecmp(cmds[i].c, argv[0]) == 0) break; } cmdnum = cmds[i].n; |