Whamcloud - gitweb
LU-2627 e2fsck: check_symlink() SIGSEGV 45/5045/1 v1.42.6.wc2
authorBobi Jam <bobijam.xu@intel.com>
Thu, 17 Jan 2013 03:41:15 +0000 (11:41 +0800)
committerBobi Jam <bobijam.xu@intel.com>
Thu, 17 Jan 2013 03:46:23 +0000 (11:46 +0800)
Since e2fsck_pass1_check_symlink()->
check_symlink(ctx, NULL, ino, inode, buf), we should use 'ino' instead
of 'pctx->ino' in check_symlink().

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: If9c16f96d0655d5a886ef607f1f47ced6176f8d8

e2fsck/pass1.c

index 2689bc0..724b0ae 100644 (file)
@@ -187,7 +187,7 @@ static int check_symlink(e2fsck_t ctx, struct problem_context *pctx,
 
                if (inode->i_size > ctx->fs->blocksize)
                        return 0;
-               if (ext2fs_extent_open2(ctx->fs, pctx->ino, inode, &handle))
+               if (ext2fs_extent_open2(ctx->fs, ino, inode, &handle))
                        return 0;
                if (ext2fs_extent_get_info(handle, &info) ||
                    (info.num_entries != 1) ||