From 27cc20049e891e4e820b5ded83281f87a643dc87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 27 Feb 2017 11:43:45 +0100 Subject: [PATCH] wifi: fix off-by-one in min PSK length handling The MIN_PSK_LENGTH constant was not adjusted to accommodate for the semcantic change when switching from using the raw char array to using the Genode::String class. The Genode::String::length() method includes the terminating NUL byte while strlen() does not. Fixes #2296. --- repos/dde_linux/src/drivers/wifi/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/dde_linux/src/drivers/wifi/main.cc b/repos/dde_linux/src/drivers/wifi/main.cc index 406d864a0..985912799 100644 --- a/repos/dde_linux/src/drivers/wifi/main.cc +++ b/repos/dde_linux/src/drivers/wifi/main.cc @@ -171,7 +171,7 @@ struct Wlan_configration enum { MAX_SSID_LENGTH = 32 + 1, BSSID_LENGTH = 12 + 5 + 1, PROT_LENGTH = 7 + 1, - MIN_PSK_LENGTH = 8, + MIN_PSK_LENGTH = 8 + 1, MAX_PSK_LENGTH = 63 + 1}; String ssid;