Commit dc6e501f authored by Joel Martin's avatar Joel Martin

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.
parent e472e6ce
...@@ -1464,10 +1464,10 @@ function display_tight(isTightPNG) { ...@@ -1464,10 +1464,10 @@ function display_tight(isTightPNG) {
else if (ctl === 0x0A) cmode = "png"; else if (ctl === 0x0A) cmode = "png";
else if (ctl & 0x04) cmode = "filter"; else if (ctl & 0x04) cmode = "filter";
else if (ctl < 0x04) cmode = "copy"; 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")) { if (isTightPNG && (cmode === "filter" || cmode === "copy")) {
throw("filter/copy received in tightPNG mode"); return fail("filter/copy received in tightPNG mode");
} }
switch (cmode) { switch (cmode) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment