From a4b949bbfe5815a424d61e1536c8b994d0a37a97 Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 21 Apr 2017 17:18:13 +0800 Subject: [PATCH] update --- route/api/modbus.js | 1 + 1 file changed, 1 insertion(+) diff --git a/route/api/modbus.js b/route/api/modbus.js index 3d6de7b..b500b3a 100644 --- a/route/api/modbus.js +++ b/route/api/modbus.js @@ -543,6 +543,7 @@ router if (!('func' in arr.data) || arr.data.func.length == 0) return n('ERR0055'); if (!('addr' in arr.data) || arr.data.addr.length == 0) return n('ERR0048'); if (!('value' in arr.data) || arr.data.value.length == 0) return n('ERR0049'); + if (arr.data.value > 65535) return n('ERR0049'); let cmd = `mbtcpm ${arr.data.ip} ${arr.data.node} ${arr.data.func} ${arr.data.addr} ${arr.data.value}`; res.api_res = {