vncv: fix snarf buffer realloc memory corruption

fix never updating p when snarf is reallocated,
resulting in memory corruption.
This commit is contained in:
qwx 2019-08-26 17:02:58 +02:00
parent 51cfe763a4
commit 91a8d03040

View file

@ -281,6 +281,7 @@ getsnarf(int *sz)
*sz += c;
if (n == 0){
snarf = realloc(snarf, *sz + 8192);
p = snarf + *sz;
n = 8192;
}
}