summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-02-04 14:56:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-02-04 14:56:06 (GMT)
commit3d5f479f878d0d2b85fb03f30971a58c2541ab54 (patch)
treea772ddd8f12f2a630905fcc197b55d9ae6ccd7c6 /src
parent71be4b3cca41fef6771eec2a49fee66b12f7277b (diff)
downloadhdf5-3d5f479f878d0d2b85fb03f30971a58c2541ab54.zip
hdf5-3d5f479f878d0d2b85fb03f30971a58c2541ab54.tar.gz
hdf5-3d5f479f878d0d2b85fb03f30971a58c2541ab54.tar.bz2
[svn-r217] Fixed fence-post & memory copy errors in H5F_encode_length_unusual()
Diffstat (limited to 'src')
-rw-r--r--src/H5F.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5F.c b/src/H5F.c
index d6098fc..bcd8bb2 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -177,7 +177,7 @@ H5F_term_interface(void)
void
H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l)
{
- intn i = H5F_SIZEOF_SIZE(f);
+ intn i = (intn)H5F_SIZEOF_SIZE(f)-1;
#ifdef WORDS_BIGENDIAN
/*
@@ -187,8 +187,8 @@ H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l)
*(*p) = *(l + i);
#else
/* platform has little-endian integers */
- for (; i >= 0; i--, (*p)++)
- *(*p) = *l;
+ HDmemcpy(*p,l,i+1);
+ *p+=(i+1);
#endif
#ifdef LATER