Whamcloud - gitweb
e2fsck: handle null fs in print_pathname()
authorEric Sandeen <sandeen@redhat.com>
Fri, 16 Sep 2011 20:49:22 +0000 (15:49 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 16 Sep 2011 22:43:04 +0000 (18:43 -0400)
commitda05d1413090b6aa8f728423db3279a0d5d0ce14
treedc789c34714c39a88a9d6225a1f9f4d7c345300c
parent665563b825ca697a2b4bdd340760a36f6263709e
e2fsck: handle null fs in print_pathname()

testing fs for NULL in expand_percent_expression():

e2fsck_ctx = fs ? (e2fsck_t) fs->priv_data : NULL;

implies that fs could be NULL, but it's passed to print_pathname()
which defererences it without further testing.

So make this safe by returning "???" for a nul fs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/message.c