fix: oom exceptions for OPDS, KOSync, and OTA via wolfssl (#2475)

This commit is contained in:
Justin Mitchell
2026-07-12 01:53:26 +03:00
committed by GitHub
parent 1f5669a08a
commit 3e627112f6
13 changed files with 413 additions and 233 deletions
+5
View File
@@ -61,6 +61,7 @@ class OpdsParser final : public Print {
void flush() override;
bool error() const;
bool truncated() const { return feedTruncated; }
operator bool() { return !error(); }
@@ -93,6 +94,8 @@ class OpdsParser final : public Print {
std::string prevPageUrl;
// Helper to find attribute value
static const char* findAttribute(const XML_Char** atts, const char* name);
static void assignBounded(std::string& target, const char* value, size_t maxLen);
static void appendBounded(std::string& target, const char* value, size_t len, size_t maxLen);
XML_Parser parser = nullptr;
std::vector<OpdsEntry> entries;
@@ -105,6 +108,8 @@ class OpdsParser final : public Print {
bool inAuthor = false;
bool inAuthorName = false;
bool inId = false;
bool collectCurrentEntry = false;
bool errorOccured = false;
bool feedTruncated = false;
};