More CodeQL fixes

This commit is contained in:
Kovid Goyal
2025-04-20 22:13:45 +05:30
parent 237bb35ee9
commit 341df0dccb
7 changed files with 20 additions and 22 deletions

View File

@@ -115,11 +115,9 @@ func ISO8601Parse(raw string) (time.Time, error) {
text = text[:9]
}
if text != "" {
n, err := strconv.ParseUint(text, 10, 64)
if err != nil {
if nsec, err = strconv.ParseInt(text, 10, 64); err != nil {
return errf("timestamp does not have a valid nanosecond field")
}
nsec = int64(n)
for ; extra > 0; extra-- {
nsec *= 10
}