From 66844ca1d8ef528b9cb208be020a73d068a1e6f8 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 30 Sep 2006 17:14:39 +0000 Subject: [PATCH] use snprintf --- src/os/darwin/darwin_sigar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index 74574e56..851bc2c3 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -2230,8 +2230,10 @@ int sigar_os_sys_info_get(sigar_t *sigar, SIGAR_SSTRCPY(sysinfo->vendor_code_name, codename); - sprintf(sysinfo->description, "%s %s", - sysinfo->vendor_name, sysinfo->vendor_code_name); + snprintf(sysinfo->description, + sizeof(sysinfo->description), + "%s %s", + sysinfo->vendor_name, sysinfo->vendor_code_name); #else #endif SIGAR_SSTRCPY(sysinfo->name, "FreeBSD");