mirror of https://github.com/dynup/kpatch
fix conditional in find_section_by_index()
Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
parent
634b9cee78
commit
026362fab6
|
@ -173,7 +173,7 @@ int is_rela_section(struct section *sec)
|
|||
|
||||
struct section *find_section_by_index(struct table *table, unsigned int index)
|
||||
{
|
||||
if (index == 0 || index >= table->nr)
|
||||
if (index == 0 || index > table->nr)
|
||||
return NULL;
|
||||
return &((struct section *)(table->data))[index-1];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue