Unverified Commit c5e6002a authored by Wolle's avatar Wolle Committed by GitHub

save m_lasthost in sufficient buff

since hostname can be greater than 256 byes, save lasthost in bigger charbuff
char m_lastHost[512];                // Store the last URL to a webstream
parent ee9cb7df
......@@ -2,7 +2,7 @@
* Audio.cpp
*
* Created on: Oct 26,2018
* Updated on: Dec 30a,2021
* Updated on: Dec 31,2021
* Author: Wolle (schreibfaul1)
*
*/
......@@ -402,7 +402,7 @@ bool Audio::connecttohost(const char* host, const char* user, const char* pwd) {
return false;
}
if(strlen(host) > 511) {
if(strlen(host) >= 512 - 10) {
if(audio_info) audio_info("Hostaddress is too long");
return false;
}
......
......@@ -2,7 +2,7 @@
* Audio.h
*
* Created on: Oct 26,2018
* Updated on: Nov 10,2021
* Updated on: Dec 31,2021
* Author: Wolle (schreibfaul1)
*/
......@@ -399,7 +399,7 @@ private:
const size_t m_frameSizeFLAC = 4096 * 4;
char chbuf[512];
char m_lastHost[256]; // Store the last URL to a webstream
char m_lastHost[512]; // Store the last URL to a webstream
char* m_playlistBuff = NULL; // stores playlistdata
const uint16_t m_plsBuffEntryLen = 256; // length of each entry in playlistBuff
filter_t m_filter[3]; // digital filters
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment