From b4a69f5a70e1d928f658a3d13238fd98c898a3fb Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Mon, 11 Feb 2013 22:35:21 +0100 Subject: [PATCH 1/1] afpd/directory: avoid unitialized pointer read Initialize fullpath to null so that in case of error before its allocation we don't call bdestroy on random memory. Reported by Coverity as CID #201284. --- etc/afpd/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/afpd/directory.c b/etc/afpd/directory.c index 9a4fc64e..eb1cdf58 100644 --- a/etc/afpd/directory.c +++ b/etc/afpd/directory.c @@ -815,7 +815,7 @@ struct dir *dir_add(struct vol *vol, const struct dir *dir, struct path *path, i cnid_t id; struct adouble ad; struct adouble *adp = NULL; - bstring fullpath; + bstring fullpath = NULL; AFP_ASSERT(vol); AFP_ASSERT(dir); -- 2.39.2