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 {
587587 } else {
588588 b := make (Int32Array , len (elems ))
589589 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 {
592592 return fmt .Errorf ("pq: parsing array element index %d: %v" , i , err )
593593 }
594594 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) {
559559 if len (s ) < 4 {
560560 return nil , fmt .Errorf ("invalid bytea sequence %v" , s )
561561 }
562- r , err := strconv .ParseInt (string (s [1 :4 ]), 8 , 9 )
562+ r , err := strconv .ParseUint (string (s [1 :4 ]), 8 , 8 )
563563 if err != nil {
564564 return nil , fmt .Errorf ("could not parse bytea value: %s" , err .Error ())
565565 }
You can’t perform that action at this time.
0 commit comments