1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-17 04:50:02 +02:00

src/server.go: fix an out-of-bounds bug in request parameter parsing code.

This commit is contained in:
Henrik Hautakoski 2022-05-17 18:50:58 +02:00
parent 4ff008b312
commit affc56393e
No known key found for this signature in database
GPG key ID: 608414D93E862CCD

View file

@ -67,7 +67,7 @@ func onTcpMessage(c *tcp_server.Client, args string) {
a.url = split[1]
// 3. Block time.
if len(split) > 1 {
if len(split) > 2 {
num, err := strconv.ParseInt(split[2], 10, 32)
if err == nil {
a.block_time = int(num)