tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
604 stars 188 forks source link

GPS driver/parser trigger panic #417

Open ipsusila opened 2 years ago

ipsusila commented 2 years ago

I tested GPS driver/parser and it's trigger panic, due to index out of range. The problem is in the gpsparse.go line 103. It should be written as

ms, _ := strconv.ParseInt(val[7:9], 10, 16)

since the length of NMEA time field (hhmmss.ss) is 9 bytes.

Putu

deadprogram commented 1 year ago

Sorry about the slow response @ipsusila I think you are correct! Would you be able to submit a PR with the correction?