long pid = atol(entry->d_name);\r
if (0 == pid)\r
continue;\r
- sprintf(full_path, "%s/%ld/%s", PROC_DIR, pid, COMM_FILE);\r
+ snprintf(full_path, sizeof(full_path), "%s/%ld/%s", PROC_DIR, pid, COMM_FILE);\r
FILE *proc_name_file = fopen(full_path, "r");\r
if (NULL == proc_name_file)\r
continue;\r