mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-24 03:49:45 +00:00
dashboard/app: fix 2 crashes on invalud input data
This commit is contained in:
parent
11cf581658
commit
299c167882
@ -61,7 +61,7 @@ func checkCrashTextAccess(c context.Context, r *http.Request, field string, id i
|
||||
return fmt.Errorf("failed to query crashes: %v", err)
|
||||
}
|
||||
if len(crashes) != 1 {
|
||||
fmt.Errorf("checkCrashTextAccess: found %v crashes for %v=%v",
|
||||
return fmt.Errorf("checkCrashTextAccess: found %v crashes for %v=%v",
|
||||
len(crashes), field, id)
|
||||
}
|
||||
bug := new(Bug)
|
||||
|
@ -257,8 +257,9 @@ func handleBug(c context.Context, w http.ResponseWriter, r *http.Request) error
|
||||
func handleText(c context.Context, w http.ResponseWriter, r *http.Request) error {
|
||||
tag := r.FormValue("tag")
|
||||
id, err := strconv.ParseInt(r.FormValue("id"), 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to parse text id: %v", err)
|
||||
if err != nil || id == 0 {
|
||||
log.Infof(c, "failed to parse text id: %v", err)
|
||||
return nil
|
||||
}
|
||||
if err := checkTextAccess(c, r, tag, id); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user