Skip to content

Commit

Permalink
Merge pull request #499 from michael-methner/master
Browse files Browse the repository at this point in the history
Fix compile error stringop-truncation with GCC 9.4
  • Loading branch information
lvklevankhanh committed Jun 16, 2023
2 parents 0db05d0 + d6bb6b6 commit 5ffba7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/console/dlt-control-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ void set_ecuid(char *ecuid)
if (dlt_parse_config_param("ECUId", &ecuid_conf) == 0) {
memset(local_ecuid, 0, DLT_CTRL_ECUID_LEN);
strncpy(local_ecuid, ecuid_conf, DLT_CTRL_ECUID_LEN);
local_ecuid[DLT_CTRL_ECUID_LEN -1] = '\0';
if (ecuid_conf !=NULL)
free(ecuid_conf);
local_ecuid[DLT_CTRL_ECUID_LEN - 1] = '\0';
}
else {
pr_error("Cannot read ECUid from dlt.conf\n");
Expand Down

0 comments on commit 5ffba7d

Please sign in to comment.