Skip to content

Conversation

@scaprile
Copy link
Collaborator

No description provided.

@scaprile scaprile changed the title Handle OOM situations in iobuf expansion Handle OOM situations Oct 29, 2025
@scaprile scaprile requested a review from robertc2000 October 29, 2025 20:18
Copy link
Member

@cpq cpq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no change to mg_vprintf() in net.c - is that intentional ?

@scaprile
Copy link
Collaborator Author

scaprile commented Oct 30, 2025

There is no change to mg_vprintf() in net.c - is that intentional ?

That's already been merged after testing, since you suggested it I assumed you'd approve it.

mongoose/src/net.c

Lines 10 to 20 in b3b73f4

size_t mg_vprintf(struct mg_connection *c, const char *fmt, va_list *ap) {
size_t old = c->send.len;
size_t expected = mg_vxprintf(mg_pfn_iobuf, &c->send, fmt, ap);
size_t actual = c->send.len - old;
if (actual != expected) {
mg_error(c, "OOM");
c->send.len = old;
actual = 0;
}
return actual;
}

@scaprile scaprile requested a review from cpq October 30, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants