Skip to content

Commit dfdb5a2

Browse files
committed
Fix: added explicit type cast
1 parent 60f0811 commit dfdb5a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ngx_http_auth_spnego_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ static ngx_int_t ngx_http_auth_spnego_obtain_server_credentials(
13821382
krb5_get_init_creds_opt_set_forwardable(&gicopts, 1);
13831383

13841384
size_t tgs_principal_name_size =
1385-
(ngx_strlen(KRB5_TGS_NAME) + (krb5_realm_length(principal->realm) * 2) + 2) + 1;
1385+
(ngx_strlen(KRB5_TGS_NAME) + ((size_t)krb5_realm_length(principal->realm) * 2) + 2) + 1;
13861386
tgs_principal_name = (char *)ngx_pcalloc(r->pool, tgs_principal_name_size);
13871387

13881388
ngx_snprintf((u_char *)tgs_principal_name, tgs_principal_name_size,

0 commit comments

Comments
 (0)