From bd8e84312f3d2f747f2ad1d701630d149c108768 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Wed, 13 Jun 2012 22:49:17 +0200 Subject: obexd: Fix use of uninitialized count variable If opendir() call fails count would be passed to callback uninitialized. --- obexd/plugins/phonebook-dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'obexd/plugins') diff --git a/obexd/plugins/phonebook-dummy.c b/obexd/plugins/phonebook-dummy.c index 035ec3578..6b9d0403f 100644 --- a/obexd/plugins/phonebook-dummy.c +++ b/obexd/plugins/phonebook-dummy.c @@ -218,7 +218,7 @@ static gboolean read_dir(void *user_data) struct dummy_data *dummy = user_data; GString *buffer; DIR *dp; - uint16_t count, max, offset; + uint16_t count = 0, max, offset; buffer = g_string_new(""); -- cgit v1.2.3