xfs
[Top] [All Lists]

[PATCH] Fix segmentation fault when using xfs_quota state command.

To: xfs@xxxxxxxxxxx
Subject: [PATCH] Fix segmentation fault when using xfs_quota state command.
From: Utako Kusaka <utako@xxxxxxxxxxxxxx>
Date: Fri, 27 Apr 2007 11:40:51 +0900
Sender: xfs-bounce@xxxxxxxxxxx
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@xxxxxxxxxxxxxx>
---

--- 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;

 
 


<Prev in Thread] Current Thread [Next in Thread>