diff options
author | qwx <devnull@localhost> | 2019-08-26 17:02:58 +0200 |
---|---|---|
committer | qwx <devnull@localhost> | 2019-08-26 17:02:58 +0200 |
commit | 91a8d03040a3533e27f51d33bbbfed33d84b5043 (patch) | |
tree | 59939aed93a8c96e963f332f7c72cdff330fcfe2 /sys/src/cmd | |
parent | 51cfe763a491cf72f5177d3ccdca09edcb0340e9 (diff) |
vncv: fix snarf buffer realloc memory corruption
fix never updating p when snarf is reallocated,
resulting in memory corruption.
Diffstat (limited to 'sys/src/cmd')
-rw-r--r-- | sys/src/cmd/vnc/wsys.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/cmd/vnc/wsys.c b/sys/src/cmd/vnc/wsys.c index 81ffb39d9..d4b13b655 100644 --- a/sys/src/cmd/vnc/wsys.c +++ b/sys/src/cmd/vnc/wsys.c @@ -281,6 +281,7 @@ getsnarf(int *sz) *sz += c; if (n == 0){ snarf = realloc(snarf, *sz + 8192); + p = snarf + *sz; n = 8192; } } |