]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix libhandle from possibly returning an invalid handle length.
authorBill Kendall <wkendall@sgi.com>
Wed, 23 Jun 2004 14:03:24 +0000 (14:03 +0000)
committerBill Kendall <wkendall@sgi.com>
Wed, 23 Jun 2004 14:03:24 +0000 (14:03 +0000)
Fix libhandle from possibly returning an invalid handle length.

VERSION
doc/CHANGES
libhandle/handle.c

diff --git a/VERSION b/VERSION
index 898d9f9ecbf9324032877fec2302e4045660078c..6e65ac338bd330af3c04821fbec00483e1f15343 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=2
 PKG_MINOR=6
-PKG_REVISION=17
+PKG_REVISION=18
 PKG_BUILD=1
index d6931187dacb6b57ff36dc032c3733f7eb619da3..f29486c49a49ed89aa0b6637906e2e32c2ad089c 100644 (file)
@@ -1,3 +1,7 @@
+xfsprogs-2.6.18 (23 June 2004)
+       - Fix libhandle from possibly returning an invalid
+         handle length on systems where size_t is 64 bits.
+
 xfsprogs-2.6.17 (23 June 2004)
        - Fix use of isset macro, getting realtime devices to
          function correctly in xfs_db and xfs_repair.
index f93ac2f4c6340800bdca8064e4b211f21adf8fb8..749a45fc3687c217e3da81e8a20093959da6c888 100644 (file)
@@ -207,6 +207,11 @@ obj_to_handle(
        hreq.ohandle  = hbuf;
        hreq.ohandlen = (__u32 *)hlen;
 
+       /* the xfsctl call will only modify the low 32 bits of *hlen,
+        * but *hlen (size_t) could be a 64 bit value on some systems.
+        * zero it out beforehand in case any upper bits are set. */
+       *hlen = 0;
+
        ret = xfsctl(fspath, fsfd, opcode, &hreq);
        if (ret)
                return ret;