diff options
author | Joel Martin <github@martintribe.org> | 2012-05-16 18:07:18 -0500 |
---|---|---|
committer | Joel Martin <github@martintribe.org> | 2012-05-16 18:07:18 -0500 |
commit | dc6e501f20f6d49f5ce7644ee86669dc1f86180b (patch) | |
tree | 069f4e24af0b3c429e0dd3ff7a84eb55467bbfa0 | |
parent | e472e6ce3a3e465cde02e2743967d2898744f2bc (diff) | |
download | novnc-dc6e501f20f6d49f5ce7644ee86669dc1f86180b.tar.gz |
Fail the connection on unexpected tightPNG cmode.
This related to https://github.com/kanaka/noVNC/issues/145
The real fix is to QEMU so that this doesn't happen which was
submitted as a patch to the mailinglist right before this.
-rw-r--r-- | include/rfb.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rfb.js b/include/rfb.js index 91e6808..494b0a1 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -1464,10 +1464,10 @@ function display_tight(isTightPNG) { else if (ctl === 0x0A) cmode = "png"; else if (ctl & 0x04) cmode = "filter"; else if (ctl < 0x04) cmode = "copy"; - else throw("Illegal tight compression received, ctl: " + ctl); + else return fail("Illegal tight compression received, ctl: " + ctl); if (isTightPNG && (cmode === "filter" || cmode === "copy")) { - throw("filter/copy received in tightPNG mode"); + return fail("filter/copy received in tightPNG mode"); } switch (cmode) { |