Fixed strvisx usage (ok Christos@)
This commit is contained in:
parent
8edb76ef42
commit
9cdc17cae0
6
crypto/dist/ssh/scp.c
vendored
6
crypto/dist/ssh/scp.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scp.c,v 1.35 2009/02/16 20:53:54 christos Exp $ */
|
||||
/* $NetBSD: scp.c,v 1.36 2009/05/23 14:43:36 stacktic Exp $ */
|
||||
/* $OpenBSD: scp.c,v 1.163 2008/06/13 18:55:22 dtucker Exp $ */
|
||||
/*
|
||||
* scp - secure remote copy. This is basically patched BSD rcp which
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
__RCSID("$NetBSD: scp.c,v 1.35 2009/02/16 20:53:54 christos Exp $");
|
||||
__RCSID("$NetBSD: scp.c,v 1.36 2009/05/23 14:43:36 stacktic Exp $");
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/poll.h>
|
||||
@ -631,7 +631,7 @@ source(int argc, char **argv)
|
||||
if ((fd = open(name, O_RDONLY|O_NONBLOCK, 0)) < 0)
|
||||
goto syserr;
|
||||
if (strchr(name, '\n') != NULL) {
|
||||
strvisx(encname, name, sizeof(encname), VIS_NL);
|
||||
strvisx(encname, name, len, VIS_NL);
|
||||
name = encname;
|
||||
}
|
||||
if (fstat(fd, &stb) < 0) {
|
||||
|
6
crypto/dist/ssh/sshconnect2.c
vendored
6
crypto/dist/ssh/sshconnect2.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sshconnect2.c,v 1.35 2009/04/14 11:53:40 apb Exp $ */
|
||||
/* $NetBSD: sshconnect2.c,v 1.36 2009/05/23 14:43:36 stacktic Exp $ */
|
||||
/* $OpenBSD: sshconnect2.c,v 1.166 2008/07/17 08:48:00 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
__RCSID("$NetBSD: sshconnect2.c,v 1.35 2009/04/14 11:53:40 apb Exp $");
|
||||
__RCSID("$NetBSD: sshconnect2.c,v 1.36 2009/05/23 14:43:36 stacktic Exp $");
|
||||
|
||||
#include <sys/queue.h>
|
||||
|
||||
@ -424,7 +424,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
|
||||
if (len > 65536)
|
||||
len = 65536;
|
||||
msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
|
||||
strvisx(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
|
||||
strvisx(msg, raw, len, VIS_SAFE|VIS_OCTAL);
|
||||
fprintf(stderr, "%s", msg);
|
||||
xfree(msg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user