Bugzilla – Attachment 1764 Details for
Bug 1691
sftp segfaults when entering just '-'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
don't dereference NULL if a command does not follow '-'
sftp-dash-segfault.patch (text/plain), 697 bytes, created by
Colin Watson
on 2010-01-05 01:04:17 AEDT
(
hide
)
Description:
don't dereference NULL if a command does not follow '-'
Filename:
MIME Type:
Creator:
Colin Watson
Created:
2010-01-05 01:04:17 AEDT
Size:
697 bytes
patch
obsolete
>=== modified file 'sftp.c' >--- sftp.c 2009-10-06 21:37:48 +0000 >+++ sftp.c 2010-01-04 13:59:19 +0000 >@@ -1078,17 +1078,18 @@ parse_args(const char **cpp, int *pflag, > /* Skip leading whitespace */ > cp = cp + strspn(cp, WHITESPACE); > >- /* Ignore blank lines and lines which begin with comment '#' char */ >- if (*cp == '\0' || *cp == '#') >- return (0); >- > /* Check for leading '-' (disable error processing) */ > *iflag = 0; > if (*cp == '-') { > *iflag = 1; > cp++; >+ cp = cp + strspn(cp, WHITESPACE); > } > >+ /* Ignore blank lines and lines which begin with comment '#' char */ >+ if (*cp == '\0' || *cp == '#') >+ return (0); >+ > if ((argv = makeargv(cp, &argc)) == NULL) > return -1; > >
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 1691
: 1764