scp bug with 0x0a in filename:

Jonathan D. Amery jdamery at chiark.greenend.org.uk
Mon Sep 10 09:23:32 EST 2001


 This bug (Debian bug number 111692) occurs with filenames that have the
character 0x0a in them (newline).

 This is how one repeats it:

ming.empire.pick.ucam.org:~/ssh-test/                   # [01/09/10.00:15:50] $
: bash[592] ; cat > 'x
x'
This is a test.
ming.empire.pick.ucam.org:~/ssh-test/                   # [01/09/10.00:16:17] $
: bash[593] ; scp 'x
x' dorothee:ssh-test/
x
x                    0% |                             |     0       --:-- ETA
x                  100% |*****************************|    16       00:00    
lost connection
ming.empire.pick.ucam.org:~/ssh-test/                   # [01/09/10.00:16:39] $
: bash[594] ; 

dorothee.empire.pick.ucam.org:~/ssh-test/               # [01/09/10.00:16:48] $
: bash[504] ; ls
x
dorothee.empire.pick.ucam.org:~/ssh-test/               # [01/09/10.00:16:50] $
: bash[505] ; cat x 
x
This is a testdorothee.empire.pick.ucam.org:~/ssh-test/               # [01/09/10.00:16:52] $
: bash[506] ; 


 If you notice the additional characters from the end of the filename
('x') have been appended to the front of the file, and the file has been
named to the first part of the file name.

-- 
Jonathan Amery.      Now there's a light at the end of the tunnel,
   #####                Someone's lit a campfire in my cave.
  #######__o         The first rays of dawn are breaking through the clouds,
  #######'/             And somehow I know I can be brave.      - Steve Kitson




More information about the openssh-unix-dev mailing list