Date: Fri, 27 Dec 2013 22:19:19 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259965 - stable/10/lib/libproc Message-ID: <201312272219.rBRMJJOl048584@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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])
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312272219.rBRMJJOl048584>