Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 826574 Details for
Bug 1032550
scl command splits arguments with white-space
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch -- use quotes for arguments in the bash script
scl-args.patch (text/plain), 1.01 KB, created by
Honza Horak
on 2013-11-20 11:51:41 UTC
(
hide
)
Description:
Proposed patch -- use quotes for arguments in the bash script
Filename:
MIME Type:
Creator:
Honza Horak
Created:
2013-11-20 11:51:41 UTC
Size:
1.01 KB
patch
obsolete
>diff -up scl-utils-20131017/scl.c.args scl-utils-20131017/scl.c >--- scl-utils-20131017/scl.c.args 2013-11-20 12:46:18.430367787 +0100 >+++ scl-utils-20131017/scl.c 2013-11-20 12:49:09.661420197 +0100 >@@ -319,10 +319,10 @@ int main(int argc, char **argv) { > } else if (command == NULL) { > int len = 0; > for (i = separator_pos+1; i < argc; i++) { >- len += strlen(argv[i])+1; /* +1 for additional space */ >+ len += strlen(argv[i])+3; /* +1 for additional space, +2 for additional quotes */ > } > >- command = malloc(len*sizeof(char)); >+ command = malloc((len+1)*sizeof(char)); > if (command == NULL) { > fprintf(stderr, "Can't allocate memory.\n"); > exit(EXIT_FAILURE); >@@ -330,11 +330,13 @@ int main(int argc, char **argv) { > > len = 0; > for (i = separator_pos+1; i < argc; i++) { >+ command[len++] = '"'; > strcpy(command+len, argv[i]); > len += strlen(argv[i]); >- command[len] = ' '; >- len++; >+ command[len++] = '"'; >+ command[len++] = ' '; > } >+ command[len] = '\0'; > } > > tfd = mkstemp(tmp);
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 1032550
: 826574