]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_quota: Fix test for wrapped id from GETNEXTQUOTA
authorEric Sandeen <sandeen@redhat.com>
Thu, 22 Dec 2016 05:10:54 +0000 (23:10 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 22 Dec 2016 05:10:54 +0000 (23:10 -0600)
commitc89be81f59eff914f8c6331e4928d3d38c6e6571
treee8f8165266141297522ddc9ca62f508db52e7c95
parentebd6aa8b28878528f07fb1bf6c06a55600f3f783
xfs_quota: Fix test for wrapped id from GETNEXTQUOTA

dump_file and report_mount can be called with null *oid if
we aren't asking for the GETNEXTQUOTA interface, so we
should only test for the GETNEXTQUOTA wrap if *oid is
non-null.  Otherwise we'll deref a null pointer in the
test.

This only happens for certain invocations of reporting,
which apparently are not covered by any regression tests
at this point, at least on new kernels which contain
GETNEXTQUOTA.

Addresses-Coverity-ID: 1397415
Addresses-Coverity-ID: 1397416
Brown-paper-bag-worn-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
quota/report.c