]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
debugfs: fix a bug in string_to_time() which misparsed @NNNNNNN inputs
authorTheodore Ts'o <tytso@mit.edu>
Mon, 14 Mar 2016 17:54:41 +0000 (13:54 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 14 Mar 2016 17:54:41 +0000 (13:54 -0400)
Thanks to David Turner <novalis@novalis.org> for reporting this bug.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/util.c

index 770e7e10c23c9fff3a82b8945c462cd5634bcf83..bd5de79e4ef1b913748a7a1081f96f9d6b109a96 100644 (file)
@@ -232,7 +232,7 @@ extern __s64 string_to_time(const char *arg)
                /* interpret it as an integer */
                arg++;
        fallback:
-               ret = strtoll(arg+1, &tmp, 0);
+               ret = strtoll(arg, &tmp, 0);
                if (*tmp)
                        return -1;
                return ret;