summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/sgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfdisk/src/sgi.c')
-rw-r--r--libfdisk/src/sgi.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c
index 6740535..23aafd9 100644
--- a/libfdisk/src/sgi.c
+++ b/libfdisk/src/sgi.c
@@ -41,7 +41,7 @@ struct fdisk_sgi_label {
} freelist[SGI_MAXPARTITIONS + 1];
};
-static struct fdisk_parttype sgi_parttypes[] =
+static const struct fdisk_parttype sgi_parttypes[] =
{
{SGI_TYPE_VOLHDR, N_("SGI volhdr")},
{SGI_TYPE_TRKREPL, N_("SGI trkrepl")},
@@ -123,10 +123,12 @@ static struct sgi_info *sgi_new_info(void)
info->b3 = cpu_to_be16(1);
/* You may want to replace this string !!!!!!! */
- strcpy((char *) info->scsi_string, "IBM OEM 0662S12 3 30");
- strcpy((char *) info->serial, "0000");
+ strncpy((char *) info->scsi_string, "IBM OEM 0662S12 3 30",
+ sizeof(info->scsi_string));
+ strncpy((char *) info->serial, "0000", sizeof(info->serial));
info->check1816 = cpu_to_be16(18 * 256 + 16);
- strcpy((char *) info->installer, "Sfx version 5.3, Oct 18, 1994");
+ strncpy((char *) info->installer, "Sfx version 5.3, Oct 18, 1994",
+ sizeof(info->installer));
return info;
}
@@ -1009,7 +1011,8 @@ static int sgi_create_disklabel(struct fdisk_context *cxt)
/* sizeof(sgilabel->boot_file) = 16 > 6 */
memset(sgilabel->boot_file, 0, 16);
- strcpy((char *) sgilabel->boot_file, "/unix");
+ strncpy((char *) sgilabel->boot_file, "/unix",
+ sizeof(sgilabel->boot_file));
sgilabel->devparam.skew = (0);
sgilabel->devparam.gap1 = (0);