Merge pull request #309 from plaes/http-security-fixes

httpd: Fix buffer offerflow in scan_header
This commit is contained in:
René van Dorst
2026-08-07 10:08:11 +00:00
committed by GitHub
+2 -1
View File
@@ -272,7 +272,8 @@ __xdata uint8_t *scan_header(__xdata uint8_t *p)
dbg_string("\nFound multipart\n");
content_type += 30;
uint8_t i = 0;
while (content_type[i] != '\r' && content_type[i] != '\n') {
while (i < (sizeof(boundary) - 5) &&
content_type[i] != '\r' && content_type[i] != '\n') {
boundary[i + 4] = content_type[i];
i++;
}