File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -587,8 +587,8 @@ func (a *Int32Array) scanBytes(src []byte) error {
587
587
} else {
588
588
b := make (Int32Array , len (elems ))
589
589
for i , v := range elems {
590
- var x int
591
- if x , err = strconv . Atoi ( string ( v )); err != nil {
590
+ x , err := strconv . ParseInt ( string ( v ), 10 , 32 )
591
+ if err != nil {
592
592
return fmt .Errorf ("pq: parsing array element index %d: %v" , i , err )
593
593
}
594
594
b [i ] = int32 (x )
Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ func parseBytea(s []byte) (result []byte, err error) {
559
559
if len (s ) < 4 {
560
560
return nil , fmt .Errorf ("invalid bytea sequence %v" , s )
561
561
}
562
- r , err := strconv .ParseInt (string (s [1 :4 ]), 8 , 9 )
562
+ r , err := strconv .ParseUint (string (s [1 :4 ]), 8 , 8 )
563
563
if err != nil {
564
564
return nil , fmt .Errorf ("could not parse bytea value: %s" , err .Error ())
565
565
}
You can’t perform that action at this time.
0 commit comments