summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/part.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/part.c b/cmd/part.c
index e0463b5a54..9d419c967c 100644
--- a/cmd/part.c
+++ b/cmd/part.c
@@ -89,10 +89,10 @@ static int do_part_list(int argc, char *const argv[])
if (var != NULL) {
int p;
- char str[512] = { '\0', };
+ char str[3 * MAX_SEARCH_PARTITIONS] = { '\0', };
struct disk_partition info;
- for (p = 1; p < MAX_SEARCH_PARTITIONS; p++) {
+ for (p = 1; p <= MAX_SEARCH_PARTITIONS; p++) {
char t[5];
int r = part_get_info(desc, p, &info);