Specify parseInt base

This commit is contained in:
Pavel Djundik 2018-05-15 16:04:05 +03:00
parent 8edc1be7b5
commit 8442472f37

View File

@ -47,8 +47,8 @@ class Identification {
respondToIdent(socket, data) { respondToIdent(socket, data) {
data = data.toString().split(","); data = data.toString().split(",");
const lport = parseInt(data[0]); const lport = parseInt(data[0], 10) || 0;
const fport = parseInt(data[1]); const fport = parseInt(data[1], 10) || 0;
if (lport < 1 || fport < 1 || lport > 65535 || fport > 65535) { if (lport < 1 || fport < 1 || lport > 65535 || fport > 65535) {
return; return;