summaryrefslogtreecommitdiffstats
path: root/src/H5Gshad.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-09-19 18:11:56 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-09-19 18:11:56 (GMT)
commitc956e7e73a46009081b9c3e0a1eac003829a884a (patch)
treebc6ed8914886bcb67731397222d90991ee46cf7a /src/H5Gshad.c
parent25d866e9b433142c38fa6c4c8d3cad5e00d46163 (diff)
downloadhdf5-c956e7e73a46009081b9c3e0a1eac003829a884a.zip
hdf5-c956e7e73a46009081b9c3e0a1eac003829a884a.tar.gz
hdf5-c956e7e73a46009081b9c3e0a1eac003829a884a.tar.bz2
[svn-r101] Fixed uninitialized memory read.
Diffstat (limited to 'src/H5Gshad.c')
-rw-r--r--src/H5Gshad.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/H5Gshad.c b/src/H5Gshad.c
index 5de4b29..6dc997f 100644
--- a/src/H5Gshad.c
+++ b/src/H5Gshad.c
@@ -209,32 +209,27 @@ H5G_shadow_list (haddr_t dir_addr)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_shadow_assoc_node (hdf5_file_t *f, H5G_node_t *sym, H5G_entry_t *self)
+H5G_shadow_assoc_node (hdf5_file_t *f, H5G_node_t *sym, H5G_ac_ud1_t *ac_udata)
{
H5G_shadow_t *shadow = NULL;
- H5O_stab_t stab;
const char *s = NULL;
intn i = 0;
+ haddr_t heap_addr;
FUNC_ENTER (H5G_shadow_assoc_node, NULL, FAIL);
/* Check arguments */
assert (f); /* The file */
assert (sym); /* The symbol table node */
- assert (self); /* The symbol table header info */
+ assert (ac_udata); /* The symbol table header info */
- if ((shadow=H5G_shadow_list (self->header))) {
-
- /* We need the heap address so we can see the symbol names */
- if (NULL==H5O_read (f, self->header, self, H5O_NAME, 0, &stab)) {
- HRETURN_ERROR (H5E_SYM, H5E_BADMESG, FAIL);
- }
+ if ((shadow=H5G_shadow_list (ac_udata->dir_addr))) {
+ heap_addr = ac_udata->heap_addr;
while (i<sym->nsyms && shadow) {
-
/* Advance the Entry ptr until it gets to the next shadow. */
while (i<sym->nsyms &&
- (s=H5H_peek (f, stab.heap_addr, sym->entry[i].name_off)) &&
+ (s=H5H_peek (f, heap_addr, sym->entry[i].name_off)) &&
strcmp (s, shadow->name)<0) i++;
/* Advance the Shadow ptr until it gets to the next entry. */