Skip to content

Commit

Permalink
avoid buffer overrun
Browse files Browse the repository at this point in the history
  • Loading branch information
pkotamnives committed Oct 18, 2023
1 parent 2d87188 commit 5387fd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/cm_mcu/InitTask.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ void InitTask(void *parameters)
char progname_clkdesgid[CLOCK_PROGNAME_REG_NAME]; // program name from DESIGN_ID register of clock chip
char progname_eeprom[CLOCK_EEPROM_PROGNAME_REG_NAME]; // program name from eeprom
getClockProgram(i, progname_clkdesgid, progname_eeprom);
strcpy(progchip_temp[i], progname_clkdesgid);
strcpy(progeeprom_temp[i], progname_eeprom);
strncpy(progchip_temp[i], progname_clkdesgid);
strncpy(progeeprom_temp[i], progname_eeprom);
if (i == 0) {
clkr0a_moni2c_addrs[0].configname_chip = progchip_temp[i];
clkr0a_moni2c_addrs[0].configname_eeprom = progeeprom_temp[i];
Expand Down

0 comments on commit 5387fd6

Please sign in to comment.