Fix for the "list -[hH]" options if a list_head.next pointer is

encountered that contains an invalid NULL pointer.  Without the
patch, the "list -[hH]" options would complete/continue as if the
NULL were a legitimate end-of-list indicator, and no error would be
reported.
(rabin.vincent@axis.com)
This commit is contained in:
Dave Anderson 2017-03-31 13:40:02 -04:00
parent b204a20c66
commit a5ebe53b6b

View File

@ -3808,6 +3808,12 @@ do_list(struct list_data *ld)
}
if (next == 0) {
if (ld->flags & LIST_HEAD_FORMAT) {
error(INFO, "\ninvalid list entry: 0\n");
if (close_hq_on_return)
hq_close();
return -1;
}
if (CRASHDEBUG(1))
console("do_list end: next:%lx\n", next);
break;