public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix segmentation fault when using xfs_quota state command.
@ 2007-04-27  2:40 Utako Kusaka
  2007-04-27  3:58 ` Nathan Scott
  0 siblings, 1 reply; 3+ messages in thread
From: Utako Kusaka @ 2007-04-27  2:40 UTC (permalink / raw)
  To: xfs

Hi,

state command in xfs_quota causes segmentation fault when the path list is empty.
This patch fixes it.

Example:
# ./xfs_quota -x
xfs_quota_orig> path
xfs_quota_orig> state
Segmentation fault

Signed-off-by: Utako Kusaka <utako@tnes.nec.co.jp>
---

--- xfsprogs-2.8.20/quota/state.orig	2007-04-19 13:07:38.000000000 +0900
+++ xfsprogs-2.8.20/quota/state.c	2007-04-27 11:23:30.000000000 +0900
@@ -226,6 +226,9 @@ state_f(
 	if (argc != optind)
 		return command_usage(&state_cmd);
 
+	if (!fs_count)
+		return 0;
+
 	if ((fp = fopen_write_secure(fname)) == NULL)
 		return 0;

 
 

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

end of thread, other threads:[~2007-04-27  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-27  2:40 [PATCH] Fix segmentation fault when using xfs_quota state command Utako Kusaka
2007-04-27  3:58 ` Nathan Scott
2007-04-27  7:42   ` Utako Kusaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox