[web_server_idf] Prefer make_unique_for_overwrite for noninit recv buffer (#14279)

This commit is contained in:
J. Nick Koston
2026-02-26 18:17:25 -07:00
committed by GitHub
parent 1ccfcfc8d8
commit 50e7571f4c

View File

@@ -921,7 +921,7 @@ esp_err_t AsyncWebServer::handle_multipart_upload_(httpd_req_t *r, const char *c
});
// Use heap buffer - 1460 bytes is too large for the httpd task stack
auto buffer = std::make_unique<char[]>(MULTIPART_CHUNK_SIZE);
auto buffer = std::make_unique_for_overwrite<char[]>(MULTIPART_CHUNK_SIZE);
size_t bytes_since_yield = 0;
for (size_t remaining = r->content_len; remaining > 0;) {