add 32-bit tests; return errors in case of string-to-int overflows (#276)

This commit is contained in:
Alessandro Ros
2023-05-08 13:10:31 +02:00
committed by GitHub
parent 3d5496173d
commit a54a5946c7
22 changed files with 67 additions and 55 deletions

View File

@@ -47,7 +47,7 @@ func (h *Session) Unmarshal(v base.HeaderValue) error {
for k, v := range kvs {
if k == "timeout" {
iv, err := strconv.ParseUint(v, 10, 64)
iv, err := strconv.ParseUint(v, 10, 32)
if err != nil {
return err
}