Displaying 1 result from an estimated 1 matches for "newbufsize".
Did you mean:
newbbsize
2020 Jan 22
1
Memory error in the libcurl connection code
...Sometimes you get a crash, sometimes a corrupt stream, etc. Sometimes
is actually works.
It seems that the fix is simply this:
------------------------------------
--- src/modules/internet/libcurl.c~
+++ src/modules/internet/libcurl.c
@@ -762,6 +762,7 @@
void *newbuf = realloc(ctxt->buf, newbufsize);
if (!newbuf) error("Failure in re-allocation in rcvData");
ctxt->buf = newbuf; ctxt->bufsize = newbufsize;
+ ctxt->current = ctxt->buf;
}
memcpy(ctxt->buf + ctxt->filled, ptr, add);
------------------------------------
Best,
Gabor