From b6f9a0cb8dafefd67c991ca54b401789d9f75172 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 9 Dec 2008 13:46:00 +0000 Subject: fix recv size --- src/plugins/wireless/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wireless/plugin.c b/src/plugins/wireless/plugin.c index feb12de..14eab42 100644 --- a/src/plugins/wireless/plugin.c +++ b/src/plugins/wireless/plugin.c @@ -63,7 +63,7 @@ static void deinit(plugin_t *plugin, DBusConnection *connection) { static void handle_incoming(plugin_t *plugin, DBusConnection *connection) { struct wpa_ctrl *ctrl_conn = (struct wpa_ctrl *) plugin->priv; char buf[2048]; - size_t len; + size_t len = sizeof(buf); wpa_ctrl_recv(ctrl_conn, buf, &len); buf[len] = '\0'; printf("received event: %s\n", buf); -- cgit v1.2.1