Skip to content

Commit

Permalink
Patch for use-after-free (upstream PR me-no-dev#952) (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aircoookie authored Sep 25, 2022
1 parent 580743f commit ebbfed3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "https://github.com/me-no-dev/ESPAsyncWebServer.git"
},
"version": "2.0.5",
"version": "2.0.6",
"license": "LGPL-3.0",
"frameworks": "arduino",
"platforms": ["espressif8266", "espressif32"],
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP Async WebServer
version=2.0.5
version=2.0.6
author=Me-No-Dev
maintainer=Me-No-Dev
sentence=Async Web Server for ESP8266 and ESP31B (Aircoookie fork)
Expand Down
15 changes: 12 additions & 3 deletions src/StringArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,19 @@ class LinkedList {

class Iterator {
ItemType* _node;
ItemType* _nextNode = nullptr;
public:
Iterator(ItemType* current = nullptr) : _node(current) {}
Iterator(const Iterator& i) : _node(i._node) {}
Iterator& operator ++() { _node = _node->next; return *this; }
Iterator(ItemType* current = nullptr) : _node(current) {
_nextNode = _node != nullptr ? _node->next : nullptr;
}
Iterator(const Iterator& i) : _node(i._node) {
_nextNode = _node != nullptr ? _node->next : nullptr;
}
Iterator& operator ++() {
_node = _nextNode;
_nextNode = _node != nullptr ? _node->next : nullptr;
return *this;
}
bool operator != (const Iterator& i) const { return _node != i._node; }
const T& operator * () const { return _node->value(); }
const T* operator -> () const { return &_node->value(); }
Expand Down

0 comments on commit ebbfed3

Please sign in to comment.