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/netwrite.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/netwrite.c')
-rw-r--r-- | kerberosIV/krb/netwrite.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kerberosIV/krb/netwrite.c b/kerberosIV/krb/netwrite.c index edd2d80b476..ff7c22820d1 100644 --- a/kerberosIV/krb/netwrite.c +++ b/kerberosIV/krb/netwrite.c @@ -1,3 +1,4 @@ +/* $OpenBSD: netwrite.c,v 1.3 1997/12/09 07:57:32 art Exp $ */ /* $KTH: netwrite.c,v 1.8 1997/06/19 23:56:25 assar Exp $ */ /* @@ -39,6 +40,9 @@ krb_net_write(int fd, const void *v, size_t len) int wrlen = len; const char *buf = (const char*)v; + if (buf == NULL) + return -1; + do { cc = write(fd, buf, wrlen); if (cc < 0) |