Subject: crash in do_resizepart function

From: Jozef Mlich <[email-masked]>
Date: Wed, 17 Apr 2019 13:32:18 +0200

Hi,

I was trying to resize partition in image file and it ended with crash

/usr/sbin/parted ./rootfs.img resizepart 1
(gdb) bt full
#0  0x00007ffff7d79123 in free () from /lib64/libc.so.6
No symbol table info available.
#1  0x000055555555e00e in do_resizepart (dev=0x7fffffffd128,
diskp=<optimized out>) at parted.c:1569
        disk = 0x555555596df0
        part = 0x555555597fa0
        start = 0
        end = 7958736
        oldend = 7958736
        range_end = 0x555555596c00
        constraint = <optimized out>
        rc = 0
        end_input = 0x55555555f9b1 <str_list_match_any+65>
"\211\350[]A\\\303\017\037\204"
#2  0x0000555555562422 in non_interactive_mode (dev=0x7fffffffd128,
disk=0x7fffffffd130, cmd_list=<optimized out>, argc=<optimized out>,
argv=<optimized out>) at ui.c:1655
        word = 0x555555599320 "\340\203YUUU"
        i = <optimized out>
        cmd = 0x555555570340
#3  0x000055555555acc3 in main (argc=2, argv=0x7fffffffd268) at
parted.c:2348
        dev = <optimized out>
        diskp = 0x555555596df0
        status = <optimized out>

I am using fedora 29 package parted-3.2-36.fc29.x86_64

-- Jozef Mlich <[email-masked]>