]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_db: fix crc invalidation segfault
authorAnthony Iliopoulos <ailiop@suse.com>
Tue, 26 May 2020 18:35:51 +0000 (14:35 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 26 May 2020 18:35:51 +0000 (14:35 -0400)
commita19679ec0fa23fd360c510f21c498dd37d35713c
tree990afb440a4fffc43d0bf6c69ac25f27975325c3
parent5d0807adb2b3adcd00b82c4701ff78314ea075c4
xfs_db: fix crc invalidation segfault

The nowrite_ops var is declared within nested block scope but used
outside that scope, causing xfs_db to crash while trying to defererence
the verify_write pointer. Fix it by lifting the declaration to the outer
scope, where it is accessed.

Fixes: b64af2c48220c8 ("xfs_db: add crc manipulation commands")
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/crc.c