fix: oom exceptions for OPDS, KOSync, and OTA via wolfssl (#2475)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user