Module Name: src
Committed By: stacktic
Date: Sat May 23 14:43:36 UTC 2009
Modified Files:
src/crypto/dist/ssh: scp.c sshconnect2.c
Log Message:
Fixed strvisx usage (ok Christos@)
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/crypto/dist/ssh/scp.c \
src/crypto/dist/ssh/sshconnect2.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/dist/ssh/scp.c
diff -u src/crypto/dist/ssh/scp.c:1.35 src/crypto/dist/ssh/scp.c:1.36
--- src/crypto/dist/ssh/scp.c:1.35 Mon Feb 16 20:53:54 2009
+++ src/crypto/dist/ssh/scp.c Sat May 23 14:43:36 2009
@@ -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 @@
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) {
Index: src/crypto/dist/ssh/sshconnect2.c
diff -u src/crypto/dist/ssh/sshconnect2.c:1.35 src/crypto/dist/ssh/sshconnect2.c:1.36
--- src/crypto/dist/ssh/sshconnect2.c:1.35 Tue Apr 14 11:53:40 2009
+++ src/crypto/dist/ssh/sshconnect2.c Sat May 23 14:43:36 2009
@@ -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 @@
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);
}