mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
strncpy is not safe + memory optimization
This commit is contained in:
@@ -244,8 +244,7 @@ static void visu_handler(u8_t *data, int len);
|
||||
static void dmxt_handler(u8_t *data, int len);
|
||||
static void displayer_task(void* arg);
|
||||
|
||||
// PLACEHOLDER
|
||||
void *led_display = 0x1000;
|
||||
void *led_display;
|
||||
|
||||
/* scrolling undocumented information
|
||||
grfs
|
||||
@@ -537,7 +536,8 @@ static void show_display_buffer(char *ddram) {
|
||||
char *line2;
|
||||
|
||||
memset(line1, 0, LINELEN+1);
|
||||
strncpy(line1, ddram, LINELEN);
|
||||
strncpy(line1, ddram, LINELEN+1);
|
||||
line1[LINELEN] = '\0';
|
||||
line2 = &(ddram[LINELEN]);
|
||||
line2[LINELEN] = '\0';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user