From 194454d7a8f8cb8ac55f2b9d0199ef9445788bee Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 6 Jun 2013 08:16:04 +1000 Subject: [PATCH] - dtucker@cvs.openbsd.org 2013/06/04 19:12:23 [scp.c] use MAXPATHLEN for buffer size instead of fixed value. ok markus --- ChangeLog | 3 +++ scp.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5aa24bd4e..0e9c26755 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,9 @@ force the MAC output to be 64-bit aligned so umac won't see unaligned accesses on strict-alignment architectures. bz#2101, patch from tomas.kuthan at oracle.com, ok djm@ + - dtucker@cvs.openbsd.org 2013/06/04 19:12:23 + [scp.c] + use MAXPATHLEN for buffer size instead of fixed value. ok markus 20130602 - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy diff --git a/scp.c b/scp.c index b75d97bb9..9b5959d44 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.174 2013/06/01 20:59:25 dtucker Exp $ */ +/* $OpenBSD: scp.c,v 1.175 2013/06/04 19:12:23 dtucker Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -850,7 +850,7 @@ rsource(char *name, struct stat *statp) { DIR *dirp; struct dirent *dp; - char *last, *vect[1], path[1100]; + char *last, *vect[1], path[MAXPATHLEN]; if (!(dirp = opendir(name))) { run_err("%s: %s", name, strerror(errno));