Skip to content

Commit

Permalink
Merge pull request #97 from jostanislas/dev
Browse files Browse the repository at this point in the history
Fixed issues found in Cycode Vulnerabilities
  • Loading branch information
NeetishPathak committed May 12, 2023
2 parents b3f417f + e459aa5 commit 26964d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 1 addition & 5 deletions cmd/dbscanserv/app/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ func (s *Scanner) ScanAndMerge(rangeid int, jm *prime.JoinMap, rs *prime.Result)
}

err := s.merge(rangeid, jm, rs)
if err != nil {
return err
}

return nil
return err
}

func (s *Scanner) GetNext(rangeid int, keyList prime.KeyList) *prime.MessageBlock {
Expand Down
3 changes: 2 additions & 1 deletion cmd/proxy/stats/monhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ func (h *HandlerForMonitor) handleQuery(w http.ResponseWriter, urlPath string, v
}
w.Write([]byte(str))
default:
w.Write([]byte(fmt.Sprintf("key: %s not supported", key)))
// w.Write([]byte(fmt.Sprintf("key: %s not supported", key)))
fmt.Fprintf(w, "key: %s not supported", key)
}
} else {
w.Write([]byte("query not supported"))
Expand Down
11 changes: 7 additions & 4 deletions cmd/proxy/watcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,13 @@ func (w *Watcher) onMarkDownEvent(ev *clientv3.Event) {
markdownobj.Reset()
return
}

zoneid, _ := strconv.Atoi(string(ev.Kv.Value))
glog.Infof("markdown: zoneid=%d", zoneid)
markdownobj.MarkDown(int32(zoneid))
zoneid, err := strconv.ParseUint(string(ev.Kv.Value), 10, 32)
if err == nil {
glog.Infof("markdown: zoneid=%d", zoneid)
markdownobj.MarkDown(int32(zoneid))
} else {
glog.Errorf("markdown failed. Error:", err.Error())
}
}

func (w *Watcher) Stop() {
Expand Down

0 comments on commit 26964d9

Please sign in to comment.