vncv: fix snarf buffer realloc memory corruption
fix never updating p when snarf is reallocated, resulting in memory corruption.
This commit is contained in:
parent
51cfe763a4
commit
91a8d03040
1 changed files with 1 additions and 0 deletions
|
@ -281,6 +281,7 @@ getsnarf(int *sz)
|
||||||
*sz += c;
|
*sz += c;
|
||||||
if (n == 0){
|
if (n == 0){
|
||||||
snarf = realloc(snarf, *sz + 8192);
|
snarf = realloc(snarf, *sz + 8192);
|
||||||
|
p = snarf + *sz;
|
||||||
n = 8192;
|
n = 8192;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue