summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/svc_auth_des.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/rpc/svc_auth_des.c')
-rw-r--r--lib/libc/rpc/svc_auth_des.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/rpc/svc_auth_des.c b/lib/libc/rpc/svc_auth_des.c
index f3af780..0d363c1 100644
--- a/lib/libc/rpc/svc_auth_des.c
+++ b/lib/libc/rpc/svc_auth_des.c
@@ -46,6 +46,8 @@
*
*/
+#include "reentrant.h"
+#include "namespace.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@@ -60,6 +62,7 @@
#include <rpc/svc.h>
#include <rpc/rpc_msg.h>
#include <rpc/svc_auth.h>
+#include "libc_private.h"
#if defined(LIBC_SCCS) && !defined(lint)
/* from: static char sccsid[] = "@(#)svcauth_des.c 2.3 89/07/11 4.0 RPCSRC; from 1.15 88/02/08 SMI"; */
@@ -190,7 +193,7 @@ _svcauth_des(rqst, msg)
}
} else { /* ADN_NICKNAME */
sid = (short)cred->adc_nickname;
- if (sid >= AUTHDES_CACHESZ) {
+ if (sid < 0 || sid >= AUTHDES_CACHESZ) {
debug("bad nickname");
return (AUTH_BADCRED); /* garbled credential */
}
OpenPOWER on IntegriCloud