[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request novnc#524 from kanaka/bug/tight-buffer-overread
Browse files Browse the repository at this point in the history
Fix buffer over-reads in handle_tight
  • Loading branch information
DirectXMan12 committed Aug 27, 2015
2 parents a369a80 + 89bdc8c commit 40b35fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/rfb.js
Original file line number Diff line number Diff line change
Expand Up @@ -1782,8 +1782,8 @@ var RFB;
return dest;
}.bind(this);

var rQ = this._sock.get_rQ();
var rQi = this._sock.get_rQi();
var rQ = this._sock.rQwhole();
var cmode, data;
var cl_header, cl_data;

Expand Down
4 changes: 4 additions & 0 deletions include/websock.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ function Websock() {
this._rQi += len;
},

rQwhole: function () {
return new Uint8Array(this._rQ.buffer, 0, this._rQlen);
},

rQslice: function (start, end) {
if (end) {
return new Uint8Array(this._rQ.buffer, this._rQi + start, end - start);
Expand Down

0 comments on commit 40b35fa

Please sign in to comment.