GUAC-1511: ArrayBufferWriter must not exceed maximum instruction size of 8192 bytes.
This commit is contained in:
1 parent
ac79cacea0
commit
99c3f2696f
1 file changed
+3
-3
@@ -71,13 +71,13 @@ Guacamole.ArrayBufferWriter = function(stream) {
|
||||
var bytes = new Uint8Array(data);
|
||||
|
||||
// If small enough to fit into single instruction, send as-is
|
||||
if (bytes.length <= 8064)
|
||||
if (bytes.length <= 6048)
|
||||
__send_blob(bytes);
|
||||
|
||||
// Otherwise, send as multiple instructions
|
||||
else {
|
||||
for (var offset=0; offset<bytes.length; offset += 8064)
|
||||
__send_blob(bytes.subarray(offset, offset + 8094));
|
||||
for (var offset=0; offset<bytes.length; offset += 6048)
|
||||
__send_blob(bytes.subarray(offset, offset + 6048));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user