[PATCH 4/5] fdisk: fix segfault when printing gpt raw data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
 fdisks/fdisk.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index 612bf87..a3ac087 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -1390,7 +1390,8 @@ static void print_raw(struct fdisk_context *cxt)
 	int i;
 
 	printf(_("Device: %s\n"), cxt->dev_path);
-	if (disklabel == SUN_LABEL || disklabel == SGI_LABEL)
+	if (disklabel == SUN_LABEL || disklabel == SGI_LABEL ||
+	    disklabel == GPT_LABEL)
 		print_buffer(cxt, cxt->firstsector);
 	else for (i = 3; i < partitions; i++)
 		     print_buffer(cxt, ptes[i].sectorbuffer);
-- 
1.7.9.5




--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux