[PATCH] ext3: Fix not initialized hash info in ext3_dx_find_entry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- In fs/ext3/namei.c, Variable "hinfo" may be referenced before it has
been set with a value.

Signed-off-by: Wang Chen <wangchen@xxxxxxxxxxxxxx>
---

diff -Nurp linux-2.6.22.4.org/fs/ext3/namei.c linux-2.6.22.4/fs/ext3/namei.c
--- linux-2.6.22.4.org/fs/ext3/namei.c  2007-08-22 15:33:40.000000000 +0800
+++ linux-2.6.22.4/fs/ext3/namei.c      2007-08-28 17:47:44.000000000 +0800
@@ -952,6 +952,12 @@ static struct buffer_head * ext3_dx_find
               frame->bh = NULL;                       /* for dx_release() */
               frame->at = (struct dx_entry *)frames;  /* hack for zero entry*/
               dx_set_block(frame->at, 0);             /* dx_root block is 0 */
+               if (dentry){
+                       ext3fs_dirhash(dentry->d_name.name, dentry->d_name.len,
+                                      &hinfo);
+               } else {
+                       return NULL;
+               }
       }
       hash = hinfo.hash;
       do {

--
Wang Chen
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux