mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Added command length guard to desktop multiplexor.
This commit is contained in:
parent
4def04a58f
commit
6d7289f74a
1 changed files with 2 additions and 0 deletions
|
@ -471,6 +471,8 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, func) {
|
||||||
if ((typeof data != 'object') || (data.length < 4)) return; // Ignore all control traffic for now (WebRTC)
|
if ((typeof data != 'object') || (data.length < 4)) return; // Ignore all control traffic for now (WebRTC)
|
||||||
var command = data.readUInt16BE(0);
|
var command = data.readUInt16BE(0);
|
||||||
var cmdsize = data.readUInt16BE(2);
|
var cmdsize = data.readUInt16BE(2);
|
||||||
|
if (data.length != cmdsize) return; // Invalid command length
|
||||||
|
|
||||||
//console.log('ViewerData', data.length, command, cmdsize);
|
//console.log('ViewerData', data.length, command, cmdsize);
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 1: // Key Events, forward to agent
|
case 1: // Key Events, forward to agent
|
||||||
|
|
Loading…
Reference in a new issue