From b974646749716ea35649513329d6bd34a698f78e Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Fri, 10 Apr 2020 12:38:33 +0800 Subject: [PATCH] Fix int overflow --- frontend/telegram_bot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/telegram_bot.go b/frontend/telegram_bot.go index d53e25c..a742c07 100644 --- a/frontend/telegram_bot.go +++ b/frontend/telegram_bot.go @@ -115,11 +115,11 @@ func webHandlerTelegramBot(w http.ResponseWriter, r *http.Request) { } else if telegramIsCommand(request.Message.Text, "whois") { if setting.netSpecificMode == "dn42" { - targetNumber, err := strconv.Atoi(target) + targetNumber, err := strconv.ParseUint(target, 10, 64) if err == nil { if targetNumber < 10000 { targetNumber += 4242420000 - target = strconv.Itoa(targetNumber) + target = strconv.FormatUint(targetNumber, 10) } } }