From 6daddcc761e97fc3f0c0358e3ed89c6c9a47a6de Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 3 Oct 2014 15:52:02 +0200 Subject: [PATCH] filebundle: fix wrong malloc() in fb_scandir() - coverity --- src/filebundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filebundle.c b/src/filebundle.c index 07312516..4f18e103 100644 --- a/src/filebundle.c +++ b/src/filebundle.c @@ -344,7 +344,7 @@ int fb_scandir ( const char *path, fb_dirent ***list ) const filebundle_entry_t *fb; ret = dir->b.root->d.count; fb = dir->b.root->d.child; - *list = malloc(ret * sizeof(fb_dirent)); + *list = malloc(ret * sizeof(fb_dirent*)); i = 0; while (fb) { (*list)[i] = calloc(1, sizeof(fb_dirent));