Bugzilla – Attachment 1306 Details for
Bug 891
possible problem with non-printing characters during scp copy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Update patch to current, remove debugging.
openbsd-scp-nl.patch (text/plain), 1.18 KB, created by
Darren Tucker
on 2007-06-12 22:11:42 AEST
(
hide
)
Description:
Update patch to current, remove debugging.
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2007-06-12 22:11:42 AEST
Size:
1.18 KB
patch
obsolete
>Index: scp.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/scp.c,v >retrieving revision 1.157 >diff -u -p -r1.157 scp.c >--- scp.c 12 Jun 2007 08:24:20 -0000 1.157 >+++ scp.c 12 Jun 2007 12:05:23 -0000 >@@ -90,6 +90,7 @@ > #include <string.h> > #include <time.h> > #include <unistd.h> >+#include <vis.h> > > #include "xmalloc.h" > #include "atomicio.h" >@@ -569,7 +570,7 @@ source(int argc, char **argv) > off_t i, amt, statbytes; > size_t result; > int fd = -1, haderr, indx; >- char *last, *name, buf[2048]; >+ char *last, *name, buf[2048], encname[MAXPATHLEN]; > int len; > > for (indx = 0; indx < argc; ++indx) { >@@ -578,13 +579,12 @@ source(int argc, char **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|O_NONBLOCK, 0)) < 0) > goto syserr; >+ if (strchr(name, '\n') != NULL) { >+ strnvis(encname, name, sizeof(encname), VIS_NL); >+ name = encname; >+ } > if (fstat(fd, &stb) < 0) { > syserr: run_err("%s: %s", name, strerror(errno)); > goto next;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 891
:
680
| 1306