]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libfrog: fix a potential null pointer dereference
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 12 Oct 2020 15:59:19 +0000 (11:59 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 12 Oct 2020 15:59:19 +0000 (11:59 -0400)
commit0779e54dc66f5c09a80be3a0a7d782edf464bbb8
treea3e749e3cde28c4e9c623694a9afa74e1694a8b4
parent4aaeedc4a1cc52f8bc49dfc9c89704aff92b7c5e
libfrog: fix a potential null pointer dereference

Apparently, gcc 10.2 thinks that it's possible for either of the calloc
arguments to be zero here, in which case it will return NULL with a zero
errno.  I suppose it's possible to do that via integer overflow in the
macro, though I find it unlikely unless someone passes in a yuuuge value.

Nevertheless, just shut up the warning by hardcoding the error number
so I can move on to nastier bugs.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libfrog/bulkstat.c