From 57e3f7558ea9aea8b1fbf13a1fa2690e6719ca7e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 3 Oct 2024 21:15:38 -0500 Subject: net: Replace magic numbers with defines Signed-off-by: Ian Moffett --- lib/include/net/stpsession.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/include/net/stpsession.h b/lib/include/net/stpsession.h index 7f9d151..6b936d8 100644 --- a/lib/include/net/stpsession.h +++ b/lib/include/net/stpsession.h @@ -34,6 +34,9 @@ #include #include +#define MAX_USERNAME_LEN 256 +#define MAX_PASSWORD_LEN 64 + /* * 2^12 (4096) bytes is a common page size on * modern systems, this could lead to potential @@ -78,8 +81,8 @@ struct session_request { * for password protected channels. */ struct session_auth { - char username[256]; - char password[64]; + char username[MAX_USERNAME_LEN]; + char password[MAX_PASSWORD_LEN]; uint8_t code; }; -- cgit v1.2.3