python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / admin / tightvnc / 1.3.10-CVE-2019-8287.patch
blob5bfd1b9ea87fbb2451eec878f4dccc8e89e66f47
1 Adapted from https://github.com/LibVNC/libvncserver/commit/7b1ef0ffc4815cab9a96c7278394152bdc89dc4d
2 diff --git a/vncviewer/corre.c b/vncviewer/corre.c
3 index c846a10..a4c272d 100644
4 --- a/vncviewer/corre.c
5 +++ b/vncviewer/corre.c
6 @@ -56,7 +56,7 @@ HandleCoRREBPP (int rx, int ry, int rw, int rh)
7 XChangeGC(dpy, gc, GCForeground, &gcv);
8 XFillRectangle(dpy, desktopWin, gc, rx, ry, rw, rh);
10 - if (!ReadFromRFBServer(buffer, hdr.nSubrects * (4 + (BPP / 8))))
11 + if (hdr.nSubrects > BUFFER_SIZE / (4 + (BPP / 8)) || !ReadFromRFBServer(buffer, hdr.nSubrects * (4 + (BPP / 8))))
12 return False;
14 ptr = (CARD8 *)buffer;