summaryrefslogtreecommitdiff
path: root/kerberosIV/krb/rd_safe.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1997-12-09 07:57:43 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1997-12-09 07:57:43 +0000
commiteded21a00a253859f474c1bcca5d418a3c82948f (patch)
tree94e38e1e18679c1a1a5af56a04c549d26eb42255 /kerberosIV/krb/rd_safe.c
parent49ac4cb4369b59297c067ed22daacd240c981029 (diff)
Removed one expliotable hole, one possibly exploitable hole, many buffer
overflows and lots of unchecked pointers. Tags are nice too.
Diffstat (limited to 'kerberosIV/krb/rd_safe.c')
-rw-r--r--kerberosIV/krb/rd_safe.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kerberosIV/krb/rd_safe.c b/kerberosIV/krb/rd_safe.c
index 90d97b06365..eb66c799237 100644
--- a/kerberosIV/krb/rd_safe.c
+++ b/kerberosIV/krb/rd_safe.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: rd_safe.c,v 1.4 1997/12/09 07:57:34 art Exp $ */
/* $KTH: rd_safe.c,v 1.24 1997/04/19 23:18:20 joda Exp $ */
/*
@@ -55,6 +56,9 @@ void
fixup_quad_cksum(void *start, size_t len, des_cblock *key,
void *new_checksum, void *old_checksum, int little)
{
+ if (old_checksum == NULL || new_checksum == NULL)
+ return;
+
des_quad_cksum((des_cblock*)start, (des_cblock*)new_checksum, len, 2, key);
if(HOST_BYTE_ORDER){
if(little){
@@ -117,6 +121,8 @@ krb_rd_safe(void *in, u_int32_t in_length, des_cblock *key,
u_int32_t src_addr;
int delta_t;
+ if (p == NULL)
+ return KFAILURE;
pvno = *p++;
if(pvno != KRB_PROT_VERSION)