[PATCH obexd 1/7] phonebook-dummy: Fix use of uninitialized count variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If opendir() call fails count would be passed to callback
uninitialized.
---
 plugins/phonebook-dummy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/phonebook-dummy.c b/plugins/phonebook-dummy.c
index 035ec35..6b9d040 100644
--- a/plugins/phonebook-dummy.c
+++ b/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("");
 
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux