linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] btrfs-progs: Fix a segfault when using btrfs-corrupt-block with "-U"
@ 2013-11-27  5:33 Qu Wenruo
  2013-11-27  5:38 ` Qu Wenruo
  0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2013-11-27  5:33 UTC (permalink / raw)
  To: linux-btrfs; +Cc: quwenruo

When using "-U" option with btrfs-corrupt-block, it will cause a
segfault due to a missing break in getopt switch.

Reported-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 btrfs-corrupt-block.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
index f0c14a9..a2828d4 100644
--- a/btrfs-corrupt-block.c
+++ b/btrfs-corrupt-block.c
@@ -758,6 +758,7 @@ int main(int ac, char **av)
 				break;
 			case 'U':
 				chunk_tree = 1;
+				break;
 			case 'i':
 				inode = atoll(optarg);
 				if (inode == 0) {
-- 
1.8.4.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-27  5:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27  5:33 [PATCH v4] btrfs-progs: Fix a segfault when using btrfs-corrupt-block with "-U" Qu Wenruo
2013-11-27  5:38 ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).