From: Dongwoo Lee Date: Wed, 7 Sep 2022 03:05:52 +0000 (+0900) Subject: util: kernel: Fix possible vulnerability X-Git-Tag: accepted/tizen/unified/20220908.013431^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47bcf74f5789b3db5afc2842d1b2c08244aed7a5;p=platform%2Fcore%2Fsystem%2Fpass.git util: kernel: Fix possible vulnerability Change-Id: I14a31746037d78670418b2b3b615e042b9a6aab4 Signed-off-by: Dongwoo Lee --- diff --git a/src/util/kernel.c b/src/util/kernel.c index 996c83d..6259968 100644 --- a/src/util/kernel.c +++ b/src/util/kernel.c @@ -481,7 +481,10 @@ int kernel_get_thread_group_map_info(struct proc_map_info *map_info, smaps_fd = fopen(smap_file_path, "r"); if (!smaps_fd) { - _E("failed to open smap: %s", strerror(errno)); + char errstr[BUFF_MAX]; + + strerror_r(errno, errstr, BUFF_MAX); + _E("failed to open smap: %s", errstr); return -ENOENT; }