aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib/dmi/dmi_memory.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-05-11 12:28:28 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-05-11 12:28:28 -0700
commitff13f1a61f86059c2d165c9fb59622dec5ca5f58 (patch)
tree20d7849902b13a569c5faaccf6ee95f6d6feebd4 /com32/gpllib/dmi/dmi_memory.c
parent8d43bf742fc263177d39a8d408638eed408bc076 (diff)
parent9c2b6b0e10289a6d22792b07257d86d1af2fe005 (diff)
downloadsyslinux-ff13f1a61f86059c2d165c9fb59622dec5ca5f58.tar.gz
syslinux-ff13f1a61f86059c2d165c9fb59622dec5ca5f58.tar.xz
syslinux-ff13f1a61f86059c2d165c9fb59622dec5ca5f58.zip
Merge branch 'master' into pathbased
Diffstat (limited to 'com32/gpllib/dmi/dmi_memory.c')
-rw-r--r--com32/gpllib/dmi/dmi_memory.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/com32/gpllib/dmi/dmi_memory.c b/com32/gpllib/dmi/dmi_memory.c
index 58f43a00..a1f2b440 100644
--- a/com32/gpllib/dmi/dmi_memory.c
+++ b/com32/gpllib/dmi/dmi_memory.c
@@ -157,7 +157,7 @@ void dmi_memory_device_type_detail(uint16_t code, char *type_detail)
for (i = 1; i <= 12; i++)
if (code & (1 << i))
- sprintf(type_detail, "%s", detail[i - 1]);
+ snprintf(type_detail,sizeof(type_detail), "%s", detail[i - 1]);
}
}
@@ -197,7 +197,7 @@ void dmi_memory_module_types(uint16_t code, const char *sep, char *type)
for (i = 0; i <= 10; i++)
if (code & (1 << i))
- sprintf(type, "%s%s%s", type, sep, types[i]);
+ snprintf(type,sizeof(type), "%s%s%s", type, sep, types[i]);
}
}
@@ -209,7 +209,7 @@ void dmi_memory_module_connections(uint8_t code, char *connection)
if ((code & 0xF0) != 0xF0)
sprintf(connection, "%u ", code >> 4);
if ((code & 0x0F) != 0x0F)
- sprintf(connection, "%s%u", connection, code & 0x0F);
+ snprintf(connection,sizeof(connection), "%s%u", connection, code & 0x0F);
}
}
@@ -239,9 +239,9 @@ void dmi_memory_module_size(uint8_t code, char *size)
}
if (code & 0x80)
- sprintf(size, "%s %s", size, "(Double-bank Connection)");
+ snprintf(size,sizeof(size),"%s %s", size, "(Double-bank Connection)");
else
- sprintf(size, "%s %s", size, "(Single-bank Connection)");
+ snprintf(size,sizeof(size), "%s %s", size, "(Single-bank Connection)");
}
void dmi_memory_module_error(uint8_t code, const char *prefix, char *error)