You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nil pointer dereference when unmarshalling time.Time to pointer #257
var tmpJSpecialDates *time.Time
tok = fs.Scan()
if tok == fflib.FFTok_error {
goto tokerror
}
if tok == fflib.FFTok_right_brace {
break
}
if tok == fflib.FFTok_comma {
if wantVal == true {
// TODO(pquerna): this isn't an ideal error message, this handles
// things like [,,,] as an array value.
return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
}
continue
} else {
wantVal = true
}
/* handler: tmpJSpecialDates type=*time.Time kind=ptr quoted=false*/
{
if tok == fflib.FFTok_null {
} else {
tbuf, err := fs.CaptureField(tok)
if err != nil {
return fs.WrapErr(err)
}
err = tmpJSpecialDates.UnmarshalJSON(tbuf)
if err != nil {
return fs.WrapErr(err)
}
}
state = fflib.FFParse_after_value
}
tmpJSpecialDates here never gets assigned a value, hence when UnmarshalJSON is called on it, it causes a panic.
Activity