toorop / ovh-cli

Command-line tool to consume OVH services
MIT License
71 stars 11 forks source link

integer overflow #9

Open asquelt opened 4 years ago

asquelt commented 4 years ago
+ /usr/local/sbin/ovh-cli domain zone newrecord ojap.pl --field TXT --target foobarszcz --sub _acme-challenge --ttl 60 --json
Error: json: cannot unmarshal number 5098376462 into Go struct field ZoneRecord.id of type int

is there an easy fix?

asquelt commented 4 years ago

it appears that your binary on Releases page is 32-bit. i've recompiled with 64-bit alpine (docker) and now I get:

Error: strconv.ParseInt: parsing "5098367970": value out of range
Error: strconv.ParseInt: parsing "5098379894": value out of range
Error: strconv.ParseInt: parsing "5059102756": value out of range
Error: strconv.ParseInt: parsing "5098368058": value out of range
Error: strconv.ParseInt: parsing "5098376460": value out of range
Error: strconv.ParseInt: parsing "5098366593": value out of range
Error: strconv.ParseInt: parsing "5098366704": value out of range

no good :(

asquelt commented 4 years ago

i've replaced all occurences of: strconv.ParseInt(sth, 10, 32) to: strconv.ParseInt(sth, 10, 64) (in domain.go) and it fixed a problem, yay!