diff options
author | Ulrich Drepper <[email protected]> | 2009-02-01 16:20:40 -0800 |
---|---|---|
committer | Ulrich Drepper <[email protected]> | 2009-02-01 16:20:40 -0800 |
commit | d11522f075d98f6ae6a6c822dd73f4299c1a5b8a (patch) | |
tree | 3e90c12b0119d21c7c879bd5f0a1160047d4f625 | |
parent | c54453b8c7ca3877a2c1765b8046a89ef09d0b09 (diff) |
Document possible elf_strptr problem.
-rw-r--r-- | libelf/ChangeLog | 4 | ||||
-rw-r--r-- | libelf/elf_strptr.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 87c24e4f..e6ac1d21 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,7 @@ +2009-02-01 Ulrich Drepper <[email protected]> + + * elf_strptr.c: Add comment re possible problem. + 2009-01-26 Ulrich Drepper <[email protected]> * elf32_updatenull.c (updatenull_wrlock): Fix comment of diff --git a/libelf/elf_strptr.c b/libelf/elf_strptr.c index 35a0e9b6..7b837b09 100644 --- a/libelf/elf_strptr.c +++ b/libelf/elf_strptr.c @@ -1,5 +1,5 @@ /* Return string pointer from string section. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2008 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2008, 2009 Red Hat, Inc. This file is part of Red Hat elfutils. Contributed by Ulrich Drepper <[email protected]>, 1998. @@ -151,6 +151,10 @@ elf_strptr (elf, idx, offset) } if (likely (strscn->rawdata_base != NULL)) + // XXX Is this correct if a file is read and then new data is added + // XXX to the string section? Likely needs to check offset against + // XXX size of rawdata_base buffer and then iterate over rest of the + // XXX list. result = &strscn->rawdata_base[offset]; else { |