From: Bill Kendall Date: Wed, 23 Jun 2004 14:03:24 +0000 (+0000) Subject: Fix libhandle from possibly returning an invalid handle length. X-Git-Tag: v2.7.0~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe37ab5707004609c5e7057615a80f9a7623d2e1;p=thirdparty%2Fxfsprogs-dev.git Fix libhandle from possibly returning an invalid handle length. Fix libhandle from possibly returning an invalid handle length. --- diff --git a/VERSION b/VERSION index 898d9f9ec..6e65ac338 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=6 -PKG_REVISION=17 +PKG_REVISION=18 PKG_BUILD=1 diff --git a/doc/CHANGES b/doc/CHANGES index d6931187d..f29486c49 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -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. diff --git a/libhandle/handle.c b/libhandle/handle.c index f93ac2f4c..749a45fc3 100644 --- a/libhandle/handle.c +++ b/libhandle/handle.c @@ -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;