diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-05-11 12:12:01 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-05-11 12:12:01 -0700 |
commit | 9c2b6b0e10289a6d22792b07257d86d1af2fe005 (patch) | |
tree | efd71dcec5dcc0c1556fd05bb2e115736b4af84c /com32/gpllib/dmi/dmi_memory.c | |
parent | c2bd46bfc2eddc9bea70edadd203b257527e3583 (diff) | |
parent | 59541d758a1dba33218f1869ea5762fef0e53ae2 (diff) | |
download | syslinux-9c2b6b0e10289a6d22792b07257d86d1af2fe005.tar.gz syslinux-9c2b6b0e10289a6d22792b07257d86d1af2fe005.tar.xz syslinux-9c2b6b0e10289a6d22792b07257d86d1af2fe005.zip |
Merge remote branch 'erwan/master'
Diffstat (limited to 'com32/gpllib/dmi/dmi_memory.c')
-rw-r--r-- | com32/gpllib/dmi/dmi_memory.c | 10 |
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) |