Fix coredump on parsing invalid traditional option

* src/tar.c (find_argp_option): Fix loop termination condition.
This commit is contained in:
Sergey Poznyakoff
2016-03-14 13:13:04 +02:00
parent 8980ecd62d
commit da7845c656

View File

@@ -2133,7 +2133,7 @@ find_argp_option (struct argp *ap, int key)
p = find_argp_option_key (ap->options, key);
if (!p && ap->children)
{
for (child = ap->children; child; child++)
for (child = ap->children; child->argp; child++)
{
p = find_argp_option_key (child->argp->options, key);
if (p)