Otherwise, BoundsChecker complains about memcpy(foo, NULL, 0).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10118
dc483132-0cff-0310-8789-
dd5450dbe970
+Tue Jul 15 22:15:09 1997 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * serialize.c (krb5_register_serializer): Only copy over the old
+ table when there's an old table to copy over. Otherwise,
+ BoundsChecker complains about memcpy(foo, NULL, 0).
+
Tue Mar 25 00:32:55 1997 Theodore Y. Ts'o <tytso@mit.edu>
* preauth.c (obtain_sam_padata): Fix handling of the sam-timestamp
if ((stable = (krb5_ser_handle) malloc(sizeof(krb5_ser_entry) *
(kcontext->ser_ctx_count+1)))) {
/* Copy in old table */
- memcpy(stable, kcontext->ser_ctx,
- sizeof(krb5_ser_entry) * kcontext->ser_ctx_count);
+ if (kcontext->ser_ctx_count)
+ memcpy(stable, kcontext->ser_ctx,
+ sizeof(krb5_ser_entry) * kcontext->ser_ctx_count);
/* Copy in new entry */
memcpy(&stable[kcontext->ser_ctx_count], entry,
sizeof(krb5_ser_entry));