fix iobuf shrink to less than current len

This commit is contained in:
Sergio R. Caprile committed 2025-09-26 14:34:17 -03:00
1 parent 2c5a6d4df6
commit d55fb80746
3 files changed
+4

No files matched your search

+1
View File
@@ -25,6 +25,7 @@ int mg_iobuf_resize(struct mg_iobuf *io, size_t new_size) {
mg_free(io->buf);
io->buf = (unsigned char *) p;
io->size = new_size;
io->len = len;
} else {
ok = 0;
MG_ERROR(("%lld->%lld", (uint64_t) io->size, (uint64_t) new_size));