diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1997-12-09 07:57:43 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1997-12-09 07:57:43 +0000 |
commit | eded21a00a253859f474c1bcca5d418a3c82948f (patch) | |
tree | 94e38e1e18679c1a1a5af56a04c549d26eb42255 /kerberosIV/krb/name2name.c | |
parent | 49ac4cb4369b59297c067ed22daacd240c981029 (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/name2name.c')
-rw-r--r-- | kerberosIV/krb/name2name.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kerberosIV/krb/name2name.c b/kerberosIV/krb/name2name.c index aa847057353..05da49ab1d5 100644 --- a/kerberosIV/krb/name2name.c +++ b/kerberosIV/krb/name2name.c @@ -1,3 +1,4 @@ +/* $OpenBSD: name2name.c,v 1.2 1997/12/09 07:57:31 art Exp $ */ /* $KTH: name2name.c,v 1.15 1997/04/30 04:30:36 assar Exp $ */ /* @@ -51,6 +52,9 @@ krb_name_to_name(const char *host, char *phost, size_t phost_size) struct hostent *hp; struct in_addr adr; const char *tmp; + + if (phost == NULL || phost_size == 0) + return 1; adr.s_addr = inet_addr(host); hp = gethostbyname(host); |