- dtucker@cvs.openbsd.org 2010/01/08 21:50:49
[sftp.c] Fix two warnings: possibly used unitialized and use a nul byte instead of NULL pointer. ok djm@
This commit is contained in:
parent
1a8f535b97
commit
340d1688e6
|
@ -154,6 +154,10 @@
|
||||||
[sftp-server.c]
|
[sftp-server.c]
|
||||||
bz#1566 don't unnecessarily dup() in and out fds for sftp-server;
|
bz#1566 don't unnecessarily dup() in and out fds for sftp-server;
|
||||||
ok markus@
|
ok markus@
|
||||||
|
- dtucker@cvs.openbsd.org 2010/01/08 21:50:49
|
||||||
|
[sftp.c]
|
||||||
|
Fix two warnings: possibly used unitialized and use a nul byte instead of
|
||||||
|
NULL pointer. ok djm@
|
||||||
- (dtucker) [Makefile.in added roaming_client.c roaming_serv.c] Import new
|
- (dtucker) [Makefile.in added roaming_client.c roaming_serv.c] Import new
|
||||||
files for roaming and add to Makefile.
|
files for roaming and add to Makefile.
|
||||||
- (dtucker) [Makefile.in] .c files do not belong in the OBJ lines.
|
- (dtucker) [Makefile.in] .c files do not belong in the OBJ lines.
|
||||||
|
|
6
sftp.c
6
sftp.c
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: sftp.c,v 1.116 2010/01/04 02:03:57 djm Exp $ */
|
/* $OpenBSD: sftp.c,v 1.117 2010/01/08 21:50:49 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||||
*
|
*
|
||||||
|
@ -1568,7 +1568,7 @@ complete_ambiguous(const char *word, char **list, size_t count)
|
||||||
if (matchlen > strlen(word)) {
|
if (matchlen > strlen(word)) {
|
||||||
char *tmp = xstrdup(list[0]);
|
char *tmp = xstrdup(list[0]);
|
||||||
|
|
||||||
tmp[matchlen] = NULL;
|
tmp[matchlen] = '\0';
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2062,7 +2062,7 @@ int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int in, out, ch, err;
|
int in, out, ch, err;
|
||||||
char *host, *userhost, *cp, *file2 = NULL;
|
char *host = NULL, *userhost, *cp, *file2 = NULL;
|
||||||
int debug_level = 0, sshver = 2;
|
int debug_level = 0, sshver = 2;
|
||||||
char *file1 = NULL, *sftp_server = NULL;
|
char *file1 = NULL, *sftp_server = NULL;
|
||||||
char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL;
|
char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL;
|
||||||
|
|
Loading…
Reference in New Issue