From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> fdisk -l could crash randomly. Only seen on some i586 systems with certain exotic compiler options. The problem was that this item is later used in function fdisk_reset_labelitem() like this: if (item.type == 's') free(li->data.str); This may crash if item is randomly initialited. Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> --- libfdisk/src/label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfdisk/src/label.c b/libfdisk/src/label.c index 5cbbe42..0e83fdf 100644 --- a/libfdisk/src/label.c +++ b/libfdisk/src/label.c @@ -416,7 +416,7 @@ int fdisk_locate_disklabel(struct fdisk_context *cxt, int n, const char **name, */ int fdisk_get_disklabel_id(struct fdisk_context *cxt, char **id) { - struct fdisk_labelitem item; + struct fdisk_labelitem item = {0}; int rc; if (!cxt || !cxt->label || !id) -- 1.8.5.6 -- 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