diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-05-24 18:36:53 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-05-24 18:36:53 (GMT) |
commit | fa133cfb95c052f3b96b0a5089b98491b77628ef (patch) | |
tree | fb9226aa6db5511279a07f2486144ae3f2e88436 /src/H5Oalloc.c | |
parent | 415889bef3df70552a389214ca2ed241aa12e379 (diff) | |
download | hdf5-fa133cfb95c052f3b96b0a5089b98491b77628ef.zip hdf5-fa133cfb95c052f3b96b0a5089b98491b77628ef.tar.gz hdf5-fa133cfb95c052f3b96b0a5089b98491b77628ef.tar.bz2 |
[svn-r13808] Description:
Fix possible file corruption when using "new" format object headers and the
size of chunk #0 for an object header transitions between needing 1->2->4->8-
byte encoding for the size and there are "clean" messages in the object header
already. (Usually triggered by flushing the file while adding attributes to
an object)
Tested on:
Mac OS X/32 10.4.9 (amazon)
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Oalloc.c')
-rw-r--r-- | src/H5Oalloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 6badfb7..ae07294 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -594,9 +594,13 @@ H5O_alloc_extend_chunk(H5F_t *f, /* Spin through existing messages, adjusting them */ for(u = 0; u < oh->nmesgs; u++) { /* Adjust raw addresses for messages in this chunk to reflect new 'image' address */ - if(oh->mesg[u].chunkno == chunkno) + if(oh->mesg[u].chunkno == chunkno) { oh->mesg[u].raw = oh->chunk[chunkno].image + extra_prfx_size + (oh->mesg[u].raw - old_image); + /* Flag message as dirty */ + oh->mesg[u].dirty = TRUE; + } /* endif */ + /* Find continuation message which points to this chunk and adjust chunk's size */ /* (Chunk 0 doesn't have a continuation message that points to it and * it's size is directly encoded in the object header) */ |