This repository was archived by the owner on Apr 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ func (c *FuzzitClient) runLibFuzzerFuzzing() error {
201201 )
202202
203203 if c .currentJob .Args != "" {
204- args = append (args , strings . Split (c .currentJob .Args , " " )... )
204+ args = append (args , splitAndRemoveEmpty (c .currentJob .Args , " " )... )
205205 }
206206
207207 var err error
@@ -319,7 +319,7 @@ func (c *FuzzitClient) runLibFuzzerRegression() error {
319319 regressionFiles ... ,
320320 )
321321 if c .currentJob .Args != "" {
322- args = append (args , strings . Split (c .currentJob .Args , " " )... )
322+ args = append (args , splitAndRemoveEmpty (c .currentJob .Args , " " )... )
323323 }
324324
325325 log .Println ("Running regression..." )
@@ -419,7 +419,7 @@ func (c *FuzzitClient) RunJQFFuzzing() error {
419419 "fuzzer" ,
420420 }
421421 if c .currentJob .Args != "" {
422- args = append (args , strings . Split (c .currentJob .Args , " " )... )
422+ args = append (args , splitAndRemoveEmpty (c .currentJob .Args , " " )... )
423423 }
424424
425425 path , err := exec .LookPath ("java" )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import (
1111)
1212
1313const FuzzitEndpoint = "https://app.fuzzit.dev"
14- const Version = "v2.4.63 "
14+ const Version = "v2.4.64 "
1515
1616type Target struct {
1717 Name string `firestore:"target_name"`
Original file line number Diff line number Diff line change 88 "os/user"
99 "path"
1010 "path/filepath"
11+ "strings"
1112)
1213
1314func getCacheFile () (string , error ) {
@@ -24,6 +25,18 @@ func getCacheFile() (string, error) {
2425 return cacheFile , nil
2526}
2627
28+ func splitAndRemoveEmpty (s string , delimiter string ) []string {
29+ splitted := strings .Split (s , delimiter )
30+ var withoutEmptyStrings []string
31+ for _ , str := range splitted {
32+ if str != "" {
33+ withoutEmptyStrings = append (withoutEmptyStrings , str )
34+ }
35+ }
36+
37+ return withoutEmptyStrings
38+ }
39+
2740func GetValueFromEnv (variables ... string ) string {
2841 for _ , env := range variables {
2942 value := os .Getenv (env )
You can’t perform that action at this time.
0 commit comments