]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2001/10/01 08:06:28
authormouring <mouring>
Wed, 3 Oct 2001 17:30:58 +0000 (17:30 +0000)
committermouring <mouring>
Wed, 3 Oct 2001 17:30:58 +0000 (17:30 +0000)
     [scp.c]
     skip filenames containing \n; report jdamery@chiark.greenend.org.uk
     and matthew@debian.org

ChangeLog
scp.c

index 13dede848d8519810fce2f9048e04777c2e37fb7..400787549f71ebc3411589785a75465459c3321c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - markus@cvs.openbsd.org 2001/09/28 15:46:29
      [ssh.c]
      bug: read user config first; report kaukasoi@elektroni.ee.tut.fi
+   - markus@cvs.openbsd.org 2001/10/01 08:06:28
+     [scp.c]
+     skip filenames containing \n; report jdamery@chiark.greenend.org.uk
+     and matthew@debian.org
 
 20011001
  - (stevesk) loginrec.c: fix type conversion problems exposed when using
diff --git a/scp.c b/scp.c
index e603646b6ad68fa3373fb7dcfeb62ddfca1bb8a2..b5cb541b4feab46b0730a892986aa53d261aff39 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -75,7 +75,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.84 2001/09/19 19:24:19 stevesk Exp $");
+RCSID("$OpenBSD: scp.c,v 1.85 2001/10/01 08:06:28 markus Exp $");
 
 #include "xmalloc.h"
 #include "atomicio.h"
@@ -503,6 +503,11 @@ source(argc, argv)
                len = strlen(name);
                while (len > 1 && name[len-1] == '/')
                        name[--len] = '\0';
+               if (strchr(name, '\n') != NULL) {
+                       run_err("%s: skipping, filename contains a newline",
+                           name);
+                       goto next;
+               }
                if ((fd = open(name, O_RDONLY, 0)) < 0)
                        goto syserr;
                if (fstat(fd, &stb) < 0) {
This page took 0.878528 seconds and 5 git commands to generate.