mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-13 19:35:53 +08:00
Add check to avoid buffer overflow on progmem2char
transfer is limited to 300 char string, if over, string is ignored
This commit is contained in:
parent
b7e6804e24
commit
bcf2eb0e69
@ -332,7 +332,8 @@ const char POLLING_ID[]PROGMEM ="POLLING";
|
||||
char * progmem2char(const char* src)
|
||||
{
|
||||
static char buffer[300];
|
||||
strcpy_P(buffer,src);
|
||||
buffer[0]=0;
|
||||
if(strlen_P(src)<299)strcpy_P(buffer,src);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user