aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb5/krb/gic_opt.c
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2008-07-07 19:08:01 +0000
committerAlexandra Ellwood <lxs@mit.edu>2008-07-07 19:08:01 +0000
commit0db712774d2408d534db6763c66cd3a970794ca2 (patch)
treea8d0d3e8ea17e36b3e9471b7a0643d49eed0324e /src/lib/krb5/krb/gic_opt.c
parentab137e4d6bed0215b43b1d61d377c08773741d23 (diff)
downloadkrb5-0db712774d2408d534db6763c66cd3a970794ca2.zip
krb5-0db712774d2408d534db6763c66cd3a970794ca2.tar.gz
krb5-0db712774d2408d534db6763c66cd3a970794ca2.tar.bz2
krb5int_gic_opte_copy should copy elements individually
Since we are copying from one structure to another, copy elements. Using memcpy is fragile. ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20499 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/gic_opt.c')
-rw-r--r--src/lib/krb5/krb/gic_opt.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/krb5/krb/gic_opt.c b/src/lib/krb5/krb/gic_opt.c
index ab73d2c..1ba1877 100644
--- a/src/lib/krb5/krb/gic_opt.c
+++ b/src/lib/krb5/krb/gic_opt.c
@@ -216,8 +216,19 @@ krb5int_gic_opte_copy(krb5_context context,
if (NULL == oe)
return ENOMEM;
- if (opt)
- memcpy(oe, opt, sizeof(*opt));
+ if (opt) {
+ oe->flags = opt->flags;
+ oe->tkt_life = opt->tkt_life;
+ oe->renew_life = opt->renew_life;
+ oe->forwardable = opt->forwardable;
+ oe->proxiable = opt->proxiable;
+ oe->etype_list = opt->etype_list;
+ oe->etype_list_length = opt->etype_list_length;
+ oe->address_list = opt->address_list;
+ oe->preauth_list = opt->preauth_list;
+ oe->preauth_list_length = opt->preauth_list_length;
+ oe->salt = opt->salt;
+ }
/*
* Fix the flags -- the EXTENDED flag would have been