Fix ICY decoder overflow causing streams to die
This commit is contained in:
1 parent
397aee8c19
commit
5b45a79cf7
3 files changed
+4
-2
No files matched your search
@@ -19,6 +19,8 @@ git clone https://github.com/earlephilhower/ESP8266Audio
|
||||
git clone https://github.com/earlephilhower/ESP8266_Spiram
|
||||
# Once the pull request is merged, replace above with "git clone https://github.com/Gianbacchio/ESP8266_Spiram"
|
||||
````
|
||||
Alternatively, install using the Arduino Boards manager by using the following URL and selecting 2.4.0-rc2:
|
||||
https://github.com/esp8266/Arduino/releases/download/2.4.0-rc2/package_esp8266com_index.json
|
||||
|
||||
When in the IDE please select the following options:
|
||||
````
|
||||
|
||||
@@ -104,7 +104,7 @@ Change URL: <input type="text" name="url">
|
||||
|
||||
void HandleIndex(WiFiClient *client)
|
||||
{
|
||||
char buff[sizeof(BODY) + 64*3 + 3*2];
|
||||
char buff[sizeof(BODY) + sizeof(title) + sizeof(status) + sizeof(url) + 3*2];
|
||||
|
||||
Serial.printf_P(PSTR("Sending INDEX...Free mem=%d\n"), ESP.getFreeHeap());
|
||||
WebHeaders(client, NULL);
|
||||
|
||||
@@ -77,7 +77,7 @@ class ICYMDReader {
|
||||
~ICYMDReader() {
|
||||
// Get rid of any remaining bytes in the MD block
|
||||
char xxx[16];
|
||||
if (saved) avail--; // Throw away any unread bytes
|
||||
if (saved>=0) avail--; // Throw away any unread bytes
|
||||
while (avail > 16) {
|
||||
stream->readBytes(xxx, 16);
|
||||
avail -= 16;
|
||||
|
||||
Reference in new issue
Block a user