fdisk: fix segfault when printing gpt raw data
PATCH 4/5 fdisk: fix segfault when printing gpt raw data
Signed-off-by Davidlohr Bueso <[email protected]>
--- fdisks/fdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fdisks/fdisk.c +2 -1
@@ -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);
Signature · 1 line
1.7.9.5
Quoted 2 lines · Davidlohr Bueso
fdisks/fdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com