Fix: use-after-free with popt 1.19
In parse_options, we loop over all non-option arguments, adding them to
opt_input_paths.
Immediately after adding `ipath' to opt_input_paths, we call
poptFreeContext. This has the affect of free'ing pc->leftovers, which
is where these non-option arguments are stored.
This is ultimately due to this upstream commit in popt 1.19:
https://github.com/rpm-software-management/popt/commit/
7182e4618ad5a0186145fc2aa4a98c2229afdfa8
This is derived from a package patch:
https://src.fedoraproject.org/rpms/babeltrace/c/
d48452beff87b145c038f070e7182358db04336c?branch=rawhide
Change-Id: Icf330e53c2f4fad1d98a1ae494f2664670a0828e
Reported-by: Keith Seitz <keiths@redhat.com>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>