summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/prodrive/hermes/mainboard.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mainboard/prodrive/hermes/mainboard.c b/src/mainboard/prodrive/hermes/mainboard.c
index e94a8bc90c..64494b175a 100644
--- a/src/mainboard/prodrive/hermes/mainboard.c
+++ b/src/mainboard/prodrive/hermes/mainboard.c
@@ -178,9 +178,7 @@ static const char *format_pn(const char *prefix, size_t offset)
const char *part_num = eeprom_read_serial(offset, "N/A");
- memset(buffer, 0, sizeof(buffer));
- strcpy(buffer, prefix);
- strcpy(buffer + strlen(prefix), part_num);
+ snprintf(buffer, sizeof(buffer), "%s%s", prefix, part_num);
return buffer;
}