Commit 08b8eab0 authored by JP Abgrall's avatar JP Abgrall
Browse files

e2fsck: Don't use e2fsck_global_ctx unless HAVE_SIGNAL_H


Program received signal SIGSEGV, Segmentation fault.
0x56577382 in e2fsck_set_bitmap_type (fs=0x5658c2b8, default_type=2, profile_name=0x56580e12 "default", old_type=0x0) at external/e2fsprogs/e2fsck/util.c:797
797             profile_get_uint(e2fsck_global_ctx->profile, "bitmaps",

e2fsck_global_ctx is only ever initialized in unix.c PRS()
if HAVE_SIGNAL_H is defined.

Change-Id: Ic93fb8d9114054f7bf8512c622b2fb9b2ae60584
Signed-off-by: default avatarJP Abgrall <jpa@google.com>
parent e97b2b6f
......@@ -794,11 +794,15 @@ void e2fsck_set_bitmap_type(ext2_filsys fs, unsigned int default_type,
if (old_type)
*old_type = fs->default_bitmap_type;
#ifdef HAVE_SIGNAL_H
profile_get_uint(e2fsck_global_ctx->profile, "bitmaps",
profile_name, 0, default_type, &type);
profile_get_uint(e2fsck_global_ctx->profile, "bitmaps",
"all", 0, type, &type);
fs->default_bitmap_type = type ? type : default_type;
#else
fs->default_bitmap_type = default_type;
#endif
}
errcode_t e2fsck_allocate_inode_bitmap(ext2_filsys fs, const char *descr,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment