From 6b018ca6f7254edf072adb2aafcf9ef43e2c03e6 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Thu, 26 Feb 2015 13:03:05 +0200 Subject: [PATCH] wiphy: Reduce static allocation size iwd_device_get_path() is not going to produce longer string than 12 bytes (/ + maximum of uint32_t expressed as a string + '\0'). --- src/wiphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wiphy.c b/src/wiphy.c index 9a562d60..bf6406ce 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -319,7 +319,7 @@ static void network_free(void *data) const char *iwd_device_get_path(struct netdev *netdev) { - static char path[256]; + static char path[12]; snprintf(path, sizeof(path), "/%u", netdev->index); return path;