summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/asn.1/ChangeLog6
-rw-r--r--src/lib/krb5/asn.1/asn1buf.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog
index 377351ad1..fe9fe3709 100644
--- a/src/lib/krb5/asn.1/ChangeLog
+++ b/src/lib/krb5/asn.1/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jun 27 10:31:34 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * asn1buf.c (asn12krb5_buf): Initialize magic fields of structure.
+ (asn1buf_expand): If pre-allocating memory for future use, store
+ proper end of buffer.
+
Wed Jun 12 14:25:11 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* asn1_k_encode.h, asn1_k_decode.h: Add prototypes for the SAM
diff --git a/src/lib/krb5/asn.1/asn1buf.c b/src/lib/krb5/asn.1/asn1buf.c
index 327a9dfd5..822b26377 100644
--- a/src/lib/krb5/asn.1/asn1buf.c
+++ b/src/lib/krb5/asn.1/asn1buf.c
@@ -226,6 +226,7 @@ asn1_error_code asn12krb5_buf(buf, code)
int i;
*code = (krb5_data*)calloc(1,sizeof(krb5_data));
if(*code == NULL) return ENOMEM;
+ (*code)->magic = KV5M_DATA;
(*code)->data = NULL;
(*code)->length = 0;
(*code)->length = asn1buf_len(buf);
@@ -350,7 +351,8 @@ asn1_error_code asn1buf_expand(buf, inc)
inc : STANDARD_INCREMENT))
* sizeof(asn1_octet));
if(buf->base == NULL) return ENOMEM;
- buf->bound = (buf->base) + bound_offset + inc;
+ buf->bound = (buf->base) + bound_offset + (inc > STANDARD_INCREMENT ?
+ inc : STANDARD_INCREMENT);
buf->next = (buf->base) + next_offset;
return 0;
}