Fix path buffer overflow in screendump

Overflow is due to a hidden assumption in create_datetime_filename()
and create_numbered_filename() where buffer must be >= MAX_PATH bytes.

Change-Id: I9d36517d861b6925352380d551afc5439edbb340
This commit is contained in:
Aidan MacDonald 2021-08-04 20:22:37 +01:00
parent 835d0c737a
commit 34fcea0b20
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ static void (*screen_dump_hook)(int fh) = NULL;
void screen_dump(void)
{
int fd, y;
char filename[32];
char filename[MAX_PATH];
fb_data *src;
#if LCD_DEPTH == 1
@ -306,7 +306,7 @@ static const unsigned char rbmpheader[] =
void remote_screen_dump(void)
{
int fd, y;
char filename[32];
char filename[MAX_PATH];
fb_remote_data *src;
#if LCD_REMOTE_DEPTH == 1