From c7ff033737f97ef632382d1cc615b90832b7724b Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 19 Aug 2017 13:57:02 -0600 Subject: [PATCH] Assert we have a buffer --- core/servers/login/telnet.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/servers/login/telnet.js b/core/servers/login/telnet.js index 53eba3bd..8f17edf9 100644 --- a/core/servers/login/telnet.js +++ b/core/servers/login/telnet.js @@ -459,6 +459,11 @@ function TelnetClient(input, output) { }; this.dataHandler = function(b) { + if(!Buffer.isBuffer(b)) { + EnigAssert(false, `Cannot push non-buffer ${typeof b}`); + return; + } + bufs.push(b); let i;