Skip to content
Snippets Groups Projects
  • Matthew Hooker's avatar
    68e777f4
    Use built-in `IsZero` function. · 68e777f4
    Matthew Hooker authored
    This replaces a different method of checking if a value is a zero value.
    The other method worked by constructing the zero value of the type of
    the value in question, and doing an interface comparison with it. This
    does not work for certain types which are not comparable. We can work
    around this issue by using the `IsZero` function which was added in go
    1.13.
    
    This crash was found using go-fuzz.
    68e777f4
    History
    Use built-in `IsZero` function.
    Matthew Hooker authored
    This replaces a different method of checking if a value is a zero value.
    The other method worked by constructing the zero value of the type of
    the value in question, and doing an interface comparison with it. This
    does not work for certain types which are not comparable. We can work
    around this issue by using the `IsZero` function which was added in go
    1.13.
    
    This crash was found using go-fuzz.