diff options
author | Ian Moffett <ian@osmora.org> | 2024-10-03 21:15:38 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-10-03 21:17:15 -0500 |
commit | 57e3f7558ea9aea8b1fbf13a1fa2690e6719ca7e (patch) | |
tree | 2ab5615b5bfef6af78966b4cc2c54d96b0c519f5 | |
parent | 3106bb3a63a4faeef318cff7dfca60baba0e8a8f (diff) |
net: Replace magic numbers with defines
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | lib/include/net/stpsession.h | 7 |
1 files changed, 5 insertions, 2 deletions
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 <ostp/defs.h> #include <stdint.h> +#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; }; |