This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 2b27f75b587cf23d2687dd37897cbb26ed915890 (commit) from 79781031e28dee010425f575d1bf5de5b18af0d6 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 2b27f75b587cf23d2687dd37897cbb26ed915890 Author: Josep Puigdemont josep.puigdemont@linaro.org Date: Fri May 4 14:04:21 2018 +0200
linux-gen: fix compilation warnings
gcc 8 complains when strncpy may truncate the destination string, possibly not copying the null terminating character (-Werror=stringop-truncation). By using memcpy we silent gcc8, but we also make sure that the strings are null-terminated.
Signed-off-by: Josep Puigdemont josep.puigdemont@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_fdserver.c b/platform/linux-generic/odp_fdserver.c index 774fe360..4b6fd088 100644 --- a/platform/linux-generic/odp_fdserver.c +++ b/platform/linux-generic/odp_fdserver.c @@ -588,7 +588,9 @@ int _odp_fdserver_init_global(void)
/* bind to new named socket: */ local.sun_family = AF_UNIX; - strncpy(local.sun_path, sockpath, sizeof(local.sun_path)); + memcpy(local.sun_path, sockpath, sizeof(local.sun_path)); + local.sun_path[sizeof(local.sun_path) - 1] = '\0'; + res = bind(sock, (struct sockaddr *)&local, sizeof(struct sockaddr_un)); if (res == -1) { ODP_ERR("_odp_fdserver_init_global: %s\n", strerror(errno)); diff --git a/platform/linux-generic/odp_ishm.c b/platform/linux-generic/odp_ishm.c index babf51b9..cf4ec9cf 100644 --- a/platform/linux-generic/odp_ishm.c +++ b/platform/linux-generic/odp_ishm.c @@ -475,8 +475,7 @@ static int create_file(int block_index, huge_flag_t huge, uint64_t len, * external ref: */ if (flags & _ODP_ISHM_EXPORT) { - strncpy(new_block->filename, filename, - ISHM_FILENAME_MAXLEN - 1); + memcpy(new_block->filename, filename, ISHM_FILENAME_MAXLEN); snprintf(new_block->exptname, ISHM_FILENAME_MAXLEN, ISHM_EXPTNAME_FORMAT, odp_global_data.shm_dir,
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/odp_fdserver.c | 4 +++- platform/linux-generic/odp_ishm.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-)
hooks/post-receive