Lint fixes and dependency updates
This commit is contained in:
+8
-8
@@ -641,15 +641,15 @@ function session(sock) {
|
||||
while (returnObj.dataQueue.length > 4) {
|
||||
const cmdLength = parseInt(returnObj.dataQueue.readUInt32BE(0)); // Get this commands length
|
||||
|
||||
// Malformed PDU with command length 0
|
||||
if (cmdLength <= 0) {
|
||||
// Since PDU is Malformed we need to discard buffer.
|
||||
log.silly(thisLogPrefix + 'Malformed PDU with 0 Length. Discarding buffer.');
|
||||
returnObj.dataQueue = returnObj.dataQueue.slice(0, returnObj.dataQueue.length);
|
||||
// Malformed PDU with command length 0
|
||||
if (cmdLength <= 0) {
|
||||
// Since PDU is Malformed we need to discard buffer.
|
||||
log.silly(thisLogPrefix + 'Malformed PDU with 0 Length. Discarding buffer.');
|
||||
returnObj.dataQueue = returnObj.dataQueue.slice(0, returnObj.dataQueue.length);
|
||||
|
||||
// Since PDU is malformed we need to close socket since we cannot trust data from now on.
|
||||
returnObj.closeSocket();
|
||||
}
|
||||
// Since PDU is malformed we need to close socket since we cannot trust data from now on.
|
||||
returnObj.closeSocket();
|
||||
}
|
||||
|
||||
let pdu;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user