Browse Source

add port check to onmessage

session-estimator
Mathias Buus 3 years ago
parent
commit
b44e660c38
  1. 2
      lib/io.js

2
lib/io.js

@ -36,7 +36,7 @@ module.exports = class IO {
}
onmessage (socket, buffer, rinfo) {
if (buffer.byteLength < 2) return
if (buffer.byteLength < 2 || !(rinfo.port > 0 && rinfo.port < 65536)) return
const from = { id: null, host: rinfo.address, port: rinfo.port }
const state = { start: 1, end: buffer.byteLength, buffer }

Loading…
Cancel
Save