mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-11 09:16:59 +08:00
more precise usage of MAX_*_SIZE definitions.
This commit is contained in:
@@ -390,7 +390,7 @@ int handle_sec_auth_init(sec_mod_st * sec, const SecAuthInitMsg * req)
|
||||
module->auth_user(e->auth_ctx, e->username,
|
||||
sizeof(e->username));
|
||||
if (ret != 0 && req->user_name != NULL) {
|
||||
snprintf(e->username, MAX_USERNAME_SIZE, "%s",
|
||||
snprintf(e->username, sizeof(e->username), "%s",
|
||||
req->user_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ typedef struct worker_st {
|
||||
|
||||
|
||||
char username[MAX_USERNAME_SIZE];
|
||||
char groupname[MAX_USERNAME_SIZE];
|
||||
char groupname[MAX_GROUPNAME_SIZE];
|
||||
|
||||
char cert_username[MAX_USERNAME_SIZE];
|
||||
char **cert_groups;
|
||||
|
||||
Reference in New Issue
Block a user