svn commit: r259964 - stable/9/lib/libproc
Mark Johnston
markj at FreeBSD.org
Fri Dec 27 22:14:04 UTC 2013
Author: markj
Date: Fri Dec 27 22:14:03 2013
New Revision: 259964
URL: http://svnweb.freebsd.org/changeset/base/259964
Log:
MFC r257300:
Fix an off-by-one error when checking whether a given address is within
the extent of a symbol.
Modified:
stable/9/lib/libproc/proc_sym.c
Directory Properties:
stable/9/lib/libproc/ (props changed)
Modified: stable/9/lib/libproc/proc_sym.c
==============================================================================
--- stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:05:51 2013 (r259963)
+++ stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:14:03 2013 (r259964)
@@ -263,7 +263,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) {
strlcpy(name, s, namesz);
@@ -299,7 +299,7 @@ proc_addr2sym(struct proc_handle *p, uin
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) {
strlcpy(name, s, namesz);
More information about the svn-src-stable-9
mailing list