diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sftp.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -47,6 +47,11 @@ | |||
47 | - dtucker@cvs.openbsd.org 2014/04/29 19:58:50 | 47 | - dtucker@cvs.openbsd.org 2014/04/29 19:58:50 |
48 | [sftp.c] | 48 | [sftp.c] |
49 | Move nulling of variable next to where it's freed. ok markus@ | 49 | Move nulling of variable next to where it's freed. ok markus@ |
50 | - dtucker@cvs.openbsd.org 2014/04/29 20:36:51 | ||
51 | [sftp.c] | ||
52 | Don't attempt to append a nul quote char to the filename. Should prevent | ||
53 | fatal'ing with "el_insertstr failed" when there's a single quote char | ||
54 | somewhere in the string. bz#2238, ok markus@ | ||
50 | 55 | ||
51 | 20140430 | 56 | 20140430 |
52 | - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already | 57 | - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.161 2014/04/29 19:58:50 dtucker Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.162 2014/04/29 20:36:51 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -1912,7 +1912,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path, | |||
1912 | lf = el_line(el); | 1912 | lf = el_line(el); |
1913 | if (g.gl_matchc == 1) { | 1913 | if (g.gl_matchc == 1) { |
1914 | i = 0; | 1914 | i = 0; |
1915 | if (!terminated) | 1915 | if (!terminated && quote != '\0') |
1916 | ins[i++] = quote; | 1916 | ins[i++] = quote; |
1917 | if (*(lf->cursor - 1) != '/' && | 1917 | if (*(lf->cursor - 1) != '/' && |
1918 | (lastarg || *(lf->cursor) != ' ')) | 1918 | (lastarg || *(lf->cursor) != ' ')) |