mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 19:39:40 +00:00
prog: use all resource special values for opt args
This commit is contained in:
parent
af9f337ea6
commit
2dcee3b338
@ -491,6 +491,10 @@ func (r *randGen) generateArgImpl(s *state, typ Type, ignoreSpecial bool) (arg A
|
||||
}
|
||||
|
||||
if typ.Optional() && r.oneOf(5) {
|
||||
if res, ok := typ.(*ResourceType); ok {
|
||||
v := res.Desc.Values[r.Intn(len(res.Desc.Values))]
|
||||
return MakeResultArg(typ, nil, v), nil
|
||||
}
|
||||
return r.target.defaultArg(typ), nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user