sensor-plugin-tm1: change sprintf to snprintf
authorMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 3 Feb 2016 07:38:52 +0000 (16:38 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 3 Feb 2016 07:38:52 +0000 (16:38 +0900)
Change-Id: Ifcaa1c010fbd7bef51246e1bec30450f7e19390a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/lib/sensor_logs.cpp

index f482c58..86a67bd 100644 (file)
@@ -142,7 +142,7 @@ bool get_proc_name(pid_t pid, char *process_name)
 {
        char buf[NAME_MAX];
 
-       if (sprintf(buf, "%d process", pid) < 1) {
+       if (snprintf(buf, sizeof(buf), "%d process", pid) < 1) {
                return false;
        }