svn commit: r259965 - stable/10/lib/libproc
Mark Johnston
markj at FreeBSD.org
Fri Dec 27 22:19:19 UTC 2013
Author: markj
Date: Fri Dec 27 22:19:19 2013
New Revision: 259965
URL: http://svnweb.freebsd.org/changeset/base/259965
Log:
MFC r257300:
Fix an off-by-one error when checking whether a given address is within
the extent of a symbol.
Modified:
stable/10/lib/libproc/proc_sym.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/lib/libproc/proc_sym.c
==============================================================================
--- stable/10/lib/libproc/proc_sym.c Fri Dec 27 22:14:03 2013 (r259964)
+++ stable/10/lib/libproc/proc_sym.c Fri Dec 27 22:19:19 2013 (r259965)
@@ -285,7 +285,7 @@ proc_addr2sym(struct proc_handle *p, uin
* by rtld.
*/
rsym = map->pr_vaddr + sym.st_value;
- if (addr >= rsym && addr <= (rsym + sym.st_size)) {
+ if (addr >= rsym && addr < rsym + sym.st_size) {
s = elf_strptr(e, dynsymstridx, sym.st_name);
if (s) {
if (s[0] == '_' && s[1] == 'Z' && s[2])
@@ -325,7 +325,7 @@ symtab:
rsym = map->pr_vaddr + sym.st_value;
else
rsym = sym.st_value;
- if (addr >= rsym && addr <= (rsym + sym.st_size)) {
+ if (addr >= rsym && addr < rsym + sym.st_size) {
s = elf_strptr(e, symtabstridx, sym.st_name);
if (s) {
if (s[0] == '_' && s[1] == 'Z' && s[2])
More information about the svn-src-stable-10
mailing list