Fix: Check return value of fpathconf
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 4 Dec 2015 22:03:12 +0000 (17:03 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 10 Feb 2016 15:54:28 +0000 (10:54 -0500)
commit6038c87e1e44763c177d66317b0330f5a6171dc7
tree2c5e098323b18304622c2e617d6d73e335abf313
parentf2c00dfac5b17952bc2c16368157f0cbf2b50bbc
Fix: Check return value of fpathconf

Current glibc has a bug in fpathconf(fd, _PC_NAME_MAX) where it will
fail with a 32bit userland on a 64bit kernel and where the filesystem
has a large block count, see glibc bug #18675.

In any case, we should check this return value because on a failure we
we don't allocate enough memory for dirent and then overflow on the
readdir_r call.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ctf.c
This page took 0.024915 seconds and 4 git commands to generate.