summaryrefslogtreecommitdiffstats
path: root/libelf/gelf_getversym.c
diff options
context:
space:
mode:
Diffstat (limited to 'libelf/gelf_getversym.c')
-rw-r--r--libelf/gelf_getversym.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libelf/gelf_getversym.c b/libelf/gelf_getversym.c
index 9e80efc0..e7245e7e 100644
--- a/libelf/gelf_getversym.c
+++ b/libelf/gelf_getversym.c
@@ -1,5 +1,5 @@
/* Get symbol version information at the given index.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999-2009 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <[email protected]>, 1999.
@@ -71,7 +71,7 @@ gelf_getversym (data, ndx, dst)
/* The data is already in the correct form. Just make sure the
index is OK. */
- if (unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size))
+ if (INVALID_NDX (ndx, GElf_Versym, data))
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
result = NULL;