tags 378335 +pending
thanks

On Sat, Jul 15, 2006 at 02:16:08PM +0200, [EMAIL PROTECTED] wrote:
> Package:  e2fsprogs
> Program: debugfs
> Version:  1.39 (29-May-2006)
> 
> I've got segmentation fault, when I accidentlly run debugfs /dev/hda2 and
> type lsdel(where hda2 is my swap partition).

Thanks for reporting this bug!

The following patch has been applied to the e2fsprogs repository, and
will be in the next release.

                                                - Ted

# HG changeset patch
# User [EMAIL PROTECTED]
# Date 1156885376 14400
# Node ID 78dd5824848b223988f2d8531c7dbbf068bc255e
# Parent  712ade33bdf31b709d4796721bfa0f458f858a24
Fix debugfs coredump when lsdel is run without an open filesystem

Addresses Debian Bug: #378335

Signed-off-by: "Theodore Ts'o" <[EMAIL PROTECTED]>

diff -r 712ade33bdf3 -r 78dd5824848b debugfs/ChangeLog
--- a/debugfs/ChangeLog Sat Aug 19 21:16:17 2006 -0400
+++ b/debugfs/ChangeLog Tue Aug 29 17:02:56 2006 -0400
@@ -1,3 +1,9 @@ 2006-05-29  Theodore Tso  <[EMAIL PROTECTED]
+2006-08-29  Theodore Tso  <[EMAIL PROTECTED]>
+
+       * lsdel.c (do_lsdel): Fix core-dumping bug.  Don't depend on
+               current_fs being non-NULL until after the call to
+               common_args_process().  (Addresses Debian Bug: #378335)
+
 2006-05-29  Theodore Tso  <[EMAIL PROTECTED]>
 
        * util.c (reset_getopt): In order to support ancient Linux header
diff -r 712ade33bdf3 -r 78dd5824848b debugfs/lsdel.c
--- a/debugfs/lsdel.c   Sat Aug 19 21:16:17 2006 -0400
+++ b/debugfs/lsdel.c   Tue Aug 29 17:02:56 2006 -0400
@@ -81,12 +81,13 @@ void do_lsdel(int argc, char **argv)
        int                     i;
        long                    secs = 0;
        char                    *tmp;
-       time_t                  now = current_fs->now ? current_fs->now : 
time(0);
+       time_t                  now;
        FILE                    *out;
        
        if (common_args_process(argc, argv, 1, 2, "ls_deleted_inodes",
                                "[secs]", 0))
                return;
+
        if (argc > 1) {
                secs = strtol(argv[1],&tmp,0);
                if (*tmp) {
@@ -95,6 +96,7 @@ void do_lsdel(int argc, char **argv)
                }
        }
 
+       now = current_fs->now ? current_fs->now : time(0);
        max_delarray = 100;
        num_delarray = 0;
        delarray = malloc(max_delarray * sizeof(struct deleted_info));



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to