summaryrefslogtreecommitdiffstats
path: root/src/lib/rpc/svc_auth_gss.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/rpc/svc_auth_gss.c')
-rw-r--r--src/lib/rpc/svc_auth_gss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/rpc/svc_auth_gss.c b/src/lib/rpc/svc_auth_gss.c
index 1b2fa1e14..8b82291a0 100644
--- a/src/lib/rpc/svc_auth_gss.c
+++ b/src/lib/rpc/svc_auth_gss.c
@@ -645,7 +645,7 @@ svcauth_gss_get_principal(SVCAUTH *auth)
gd = SVCAUTH_PRIVATE(auth);
- if (gd->cname.length == 0)
+ if (gd->cname.length == 0 || gd->cname.length >= SIZE_MAX)
return (NULL);
if ((pname = malloc(gd->cname.length + 1)) == NULL)