+Tue May 14 19:33:27 1996 Richard Basch <basch@lehman.com>
+
+ * crc.c: ensure the cksum content length is sufficient
+
+ * crctest.c: set the cksum length field.
+
Sat Mar 30 22:54:12 1996 Theodore Y. Ts'o <tytso@dcl>
* Makefile.in (SRCS): Removed crctest.c from the SRCS list, since
/* Windows needs to these prototypes for crc32_cksumtable_entry below */
-krb5_error_code
+static krb5_error_code
crc32_sum_func PROTOTYPE((krb5_pointer in, size_t in_length,
krb5_pointer seed, size_t seed_length, krb5_checksum *outcksum));
-krb5_error_code
+static krb5_error_code
crc32_verify_func PROTOTYPE((krb5_checksum FAR *cksum, krb5_pointer in,
size_t in_length, krb5_pointer seed, size_t seed_length));
-krb5_error_code
+static krb5_error_code
crc32_sum_func(in, in_length, seed, seed_length, outcksum)
krb5_pointer in;
size_t in_length;
register int idx;
size_t i;
+ if (outcksum->length < CRC32_CKSUM_LENGTH)
+ return KRB5_BAD_MSIZE;
+
data = (u_char *)in;
for (i = 0; i < in_length; i++) {
idx = (int) (data[i] ^ c);
return 0;
}
-krb5_error_code
+static krb5_error_code
crc32_verify_func(cksum, in, in_length, seed, seed_length)
krb5_checksum FAR *cksum;
krb5_pointer in;