From: Michael Tremer Date: Thu, 26 Feb 2015 12:54:07 +0000 (+0100) Subject: installer: Cut off disk description if it gets too long X-Git-Tag: v2.17-core89~51 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=29afd40851ae28a332a59f39be40bec5bbd6010f installer: Cut off disk description if it gets too long --- diff --git a/src/installer/hw.c b/src/installer/hw.c index ce9777500d..92d0ae5c10 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -322,6 +322,9 @@ struct hw_disk** hw_find_disks(struct hw* hw, const char* sourcedrive) { "%s - %s", size_str, p); } + // Cut off the description string after 40 characters + disk->description[41] = '\0'; + *disks++ = disk; if (--i == 0)