Document possible elf_strptr problem.
authorUlrich Drepper <drepper@redhat.com>
Mon, 2 Feb 2009 00:20:40 +0000 (16:20 -0800)
committerUlrich Drepper <drepper@redhat.com>
Mon, 2 Feb 2009 00:20:40 +0000 (16:20 -0800)
libelf/ChangeLog
libelf/elf_strptr.c

index 87c24e4..e6ac1d2 100644 (file)
@@ -1,3 +1,7 @@
+2009-02-01  Ulrich Drepper  <drepper@redhat.com>
+
+       * elf_strptr.c: Add comment re possible problem.
+
 2009-01-26  Ulrich Drepper  <drepper@redhat.com>
 
        * elf32_updatenull.c (updatenull_wrlock): Fix comment of
index 35a0e9b..7b837b0 100644 (file)
@@ -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 <drepper@redhat.com>, 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
     {