]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/installer/hw.c
installer: Cut off disk description if it gets too long
[ipfire-2.x.git] / 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)