ref: 91a8d03040a3533e27f51d33bbbfed33d84b5043
parent: 51cfe763a491cf72f5177d3ccdca09edcb0340e9
author: qwx <devnull@localhost>
date: Mon Aug 26 13:02:58 EDT 2019
vncv: fix snarf buffer realloc memory corruption fix never updating p when snarf is reallocated, resulting in memory corruption.
--- a/sys/src/cmd/vnc/wsys.c
+++ b/sys/src/cmd/vnc/wsys.c
@@ -281,6 +281,7 @@
*sz += c;
if (n == 0){
snarf = realloc(snarf, *sz + 8192);
+ p = snarf + *sz;
n = 8192;
}
}