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/base64.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/base64.c')
-rw-r--r-- | kerberosIV/krb/base64.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kerberosIV/krb/base64.c b/kerberosIV/krb/base64.c index 4c67412fc64..2a7b9438253 100644 --- a/kerberosIV/krb/base64.c +++ b/kerberosIV/krb/base64.c @@ -1,3 +1,4 @@ +/* $OpenBSD: base64.c,v 1.2 1997/12/09 07:57:09 art Exp $ */ /* $KTH: base64.c,v 1.1 1997/08/27 22:41:56 joda Exp $ */ /* @@ -60,6 +61,9 @@ int base64_encode(const void *data, int size, char **str) unsigned char *q; p = s = (char*)malloc(size*4/3+4); + if (p == NULL || data == NULL || str == NULL) + return -1; + q = (unsigned char*)data; i=0; for(i = 0; i < size;){ |