summaryrefslogtreecommitdiff
path: root/lib/compat
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2013-10-26 04:17:44 +0200
committerGuillem Jover <guillem@debian.org>2013-10-27 05:05:36 +0100
commitf470bfb33f0b2d5cf20c2c533e0ccfb2145bbc5c (patch)
tree319dafbea8143682a370dc87be2e04d11402c775 /lib/compat
parent237e3a9497096ed596779c78c08497fe34dd0d3b (diff)
downloaddpkg-f470bfb33f0b2d5cf20c2c533e0ccfb2145bbc5c.tar.gz
libcompat: Do not NULL-terminate the list in scandir()
This might cause a segfault in case all entries have been filtered and list has not been allocated. This should only possibly affect systems where the fallback code is being used.
Diffstat (limited to 'lib/compat')
-rw-r--r--lib/compat/scandir.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/compat/scandir.c b/lib/compat/scandir.c
index 35551fc40..c38ae015d 100644
--- a/lib/compat/scandir.c
+++ b/lib/compat/scandir.c
@@ -85,7 +85,6 @@ scandir(const char *dir, struct dirent ***namelist,
list[used] = m;
used++;
}
- list[used] = NULL;
closedir(d);