From 18e888157e33950f12cae6b29b7927e182954cee Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 5 Feb 2018 21:36:36 +0100 Subject: [PATCH] more gcc7 fix --- libvma-8.0.1-gcc7.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libvma-8.0.1-gcc7.patch b/libvma-8.0.1-gcc7.patch index 7cf6c16..c247a53 100644 --- a/libvma-8.0.1-gcc7.patch +++ b/libvma-8.0.1-gcc7.patch @@ -622,3 +622,15 @@ diff -up libvma-8.0.1/src/vma/sock/sock-redirect.cpp.me libvma-8.0.1/src/vma/soc { BULLSEYE_EXCLUDE_BLOCK_START if (!orig_os_api.fcntl) get_orig_funcs(); +diff -up libvma-8.0.1/src/stats/stats_reader.cpp.me libvma-8.0.1/src/stats/stats_reader.cpp +--- libvma-8.0.1/src/stats/stats_reader.cpp.me 2018-02-05 21:25:40.793097034 +0100 ++++ libvma-8.0.1/src/stats/stats_reader.cpp 2018-02-05 21:28:30.415637551 +0100 +@@ -1525,7 +1525,7 @@ int init_print_process_stats(sh_mem_inf + sh_mem_t* sh_mem; + int pid = sh_mem_info.pid; + +- sprintf(sh_mem_info.filename_sh_stats, "%s/vmastat.%d", g_vma_shmem_dir, pid); ++ snprintf(sh_mem_info.filename_sh_stats, sizeof(sh_mem_info.filename_sh_stats), "%s/vmastat.%d", g_vma_shmem_dir, pid); + + if (user_params.write_auth) + sh_mem_info.fd_sh_stats = open(sh_mem_info.filename_sh_stats,O_RDWR, S_IRWXU|S_IROTH);