Merge pull request #886 from Fishybeing/fix/http-status-line-overflow

fix(http): count sceHttpParseStatusLine as implemented
This commit is contained in:
Dean 2026-10-07 11:06:19 +13:00 committed by GitHub
commit 24eac1c445
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <stdexcept>
#include "prx/libc/include/General.hpp"
#include "prx/libSceHttp/src/HttpErrors.hpp"
@ -56,7 +57,7 @@ int APS5_VABI sceHttpParseStatusLine(const char* statusLine, size_t lineLen, int
size_t length = static_cast<size_t>(static_cast<const char*>(lineFeed) - phrase);
const size_t consumed = index + length + 1;
if (consumed > static_cast<size_t>(INT32_MAX)) {
NotImplemented_nid_no_patch("sceHttpParseStatusLine: status line longer than INT32_MAX");
throw std::out_of_range("sceHttpParseStatusLine: consumed byte count exceeds int");
}
if (length > 0 && phrase[length - 1] == '\r') --length;