aboutsummaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/flashrom.c b/flashrom.c
index d6c4d248..2d3cd185 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1338,7 +1338,11 @@ notfound:
fallback->entry.start = 0;
fallback->entry.end = flash->chip->total_size * 1024 - 1;
fallback->entry.included = true;
- strcpy(fallback->entry.name, "complete flash");
+ fallback->entry.name = strdup("complete flash");
+ if (!fallback->entry.name) {
+ msg_cerr("Failed to probe chip: %s\n", strerror(errno));
+ return -1;
+ }
tmp = flashbuses_to_text(flash->chip->bustype);
msg_cinfo("%s %s flash chip \"%s\" (%d kB, %s) ", force ? "Assuming" : "Found",