]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
installer: Cut off disk description if it gets too long
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 Feb 2015 12:54:07 +0000 (13:54 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 Feb 2015 12:54:07 +0000 (13:54 +0100)
src/installer/hw.c

index ce9777500d5cbd28ecabdb10082f7fbd04760841..92d0ae5c10c51798538c907b05d9e33ced84a0c1 100644 (file)
@@ -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)