summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1997-07-16 02:16:18 +0000
committerTheodore Tso <tytso@mit.edu>1997-07-16 02:16:18 +0000
commit9c6c7b37daab8664516ec7a525e3105b3ea2114e (patch)
treee155e9f284e100ff7cda3b3510928cee2870b8fb /src
parenta196a36dce9fc571c747e20a90f350822aeb49be (diff)
downloadkrb5-9c6c7b37daab8664516ec7a525e3105b3ea2114e.tar.gz
krb5-9c6c7b37daab8664516ec7a525e3105b3ea2114e.tar.xz
krb5-9c6c7b37daab8664516ec7a525e3105b3ea2114e.zip
Only copy over the old table when there's an old table to copy over.
Otherwise, BoundsChecker complains about memcpy(foo, NULL, 0). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10118 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/ChangeLog6
-rw-r--r--src/lib/krb5/krb/serialize.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog
index 4b8f21e86..5cd795478 100644
--- a/src/lib/krb5/krb/ChangeLog
+++ b/src/lib/krb5/krb/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/src/lib/krb5/krb/serialize.c b/src/lib/krb5/krb/serialize.c
index 084ecb677..58a88e4ed 100644
--- a/src/lib/krb5/krb/serialize.c
+++ b/src/lib/krb5/krb/serialize.c
@@ -70,8 +70,9 @@ krb5_register_serializer(kcontext, entry)
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));