Bugzilla – Attachment 299 Details for
Bug 517
bad "put" arg parsing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
More concise patch
sftp-quotefix.diff (text/plain), 896 bytes, created by
Damien Miller
on 2003-05-15 18:50:43 AEST
(
hide
)
Description:
More concise patch
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2003-05-15 18:50:43 AEST
Size:
896 bytes
patch
obsolete
>Index: sftp-int.c >=================================================================== >RCS file: /var/cvs/openssh/sftp-int.c,v >retrieving revision 1.49 >diff -u -r1.49 sftp-int.c >--- sftp-int.c 15 May 2003 03:49:21 -0000 1.49 >+++ sftp-int.c 15 May 2003 08:49:56 -0000 >@@ -332,7 +332,7 @@ > { > const char *cp = *cpp, *end; > char quot; >- int i; >+ int i, j; > > cp += strspn(cp, WHITESPACE); > if (!*cp) { >@@ -345,7 +345,21 @@ > if (*cp == '\"' || *cp == '\'') { > quot = *cp++; > >- end = strchr(cp, quot); >+ /* Search for terminating quote */ >+ end = cp; >+ for (j = 0; j <= strlen(end); j++) { >+ if (end[j] == quot) { /* Found quote */ >+ end += j; >+ break; >+ } >+ if (end[j] == '\0') { /* End of string */ >+ end = NULL; >+ break; >+ } >+ if (end[j] == '\\') /* Skip escaped character */ >+ j++; >+ } >+ > if (end == NULL) { > error("Unterminated quote"); > goto fail;
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 517
:
257
|
258
|
259
|
260
|
261
|
264
|
265
|
299
|
302