From: Bill Kendall Date: Mon, 13 Jun 2005 14:59:17 +0000 (+0000) Subject: Use a temporary 32-bit variable in readlink_by_handle to avoid X-Git-Tag: v2.7.0~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1771a6dda1e452f9654454c278e514161a96312a;p=thirdparty%2Fxfsprogs-dev.git Use a temporary 32-bit variable in readlink_by_handle to avoid updating the wrong half of a size_t pointer. This could happen on 64-bit, big endian systems. --- diff --git a/VERSION b/VERSION index c48b852c6..106aa2259 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=6 -PKG_REVISION=32 +PKG_REVISION=33 PKG_BUILD=1 diff --git a/doc/CHANGES b/doc/CHANGES index 90b863b77..ad336c33c 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,3 +1,6 @@ +xfsprogs-2.6.33 (13 June 2005) + - Another libhandle fix on 64bit, Big Endian systems. + xfsprogs-2.6.32 (08 June 2005) - Minor endian cleanups in some tools. - Fix a couple of xfs_quota double-reporting issues when diff --git a/libhandle/handle.c b/libhandle/handle.c index 988f36dab..f19d8825b 100644 --- a/libhandle/handle.c +++ b/libhandle/handle.c @@ -284,6 +284,7 @@ readlink_by_handle( size_t bufsiz) { int fd; + __u32 buflen = (__u32)bufsiz; char *path; xfs_fsop_handlereq_t hreq; @@ -296,7 +297,7 @@ readlink_by_handle( hreq.ihandle = hanp; hreq.ihandlen = hlen; hreq.ohandle = buf; - hreq.ohandlen = (__u32 *)&bufsiz; + hreq.ohandlen = &buflen; return xfsctl(path, fd, XFS_IOC_READLINK_BY_HANDLE, &hreq); }