use snprintf
This commit is contained in:
parent
f32e386b19
commit
cd7231a938
@ -2199,11 +2199,15 @@ int sigar_os_sys_info_get(sigar_t *sigar,
|
|||||||
Gestalt(gestaltSystemVersionMinor, &version_minor);
|
Gestalt(gestaltSystemVersionMinor, &version_minor);
|
||||||
Gestalt(gestaltSystemVersionBugFix, &version_fix);
|
Gestalt(gestaltSystemVersionBugFix, &version_fix);
|
||||||
|
|
||||||
sprintf(sysinfo->vendor_version, "%ld.%ld",
|
snprintf(sysinfo->vendor_version,
|
||||||
version_major, version_minor);
|
sizeof(sysinfo->vendor_version),
|
||||||
|
"%ld.%ld",
|
||||||
|
version_major, version_minor);
|
||||||
|
|
||||||
sprintf(sysinfo->version, "%s.%ld",
|
snprintf(sysinfo->version,
|
||||||
sysinfo->vendor_version, version_fix);
|
sizeof(sysinfo->version),
|
||||||
|
"%s.%ld",
|
||||||
|
sysinfo->vendor_version, version_fix);
|
||||||
|
|
||||||
if (version_major == 10) {
|
if (version_major == 10) {
|
||||||
switch (version_minor) {
|
switch (version_minor) {
|
||||||
|
Loading…
Reference in New Issue
Block a user