sendto_kdc.c: use of a variable index into a dynamically
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 18 Jan 2007 11:35:33 +0000 (11:35 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 18 Jan 2007 11:35:33 +0000 (11:35 +0000)
commitd443eb86fdde098790c7590c3338591003f639d6
tree7eaf3af79be2f4a3de509ad8123ae990ab9b0b16
parente43fff1d176baff761e8154056c6240d7ab885c5
   sendto_kdc.c: use of a variable index into a dynamically
allocated array to determine the sizeof() an object makes
it unclear what type of object is involved.  It also requires
a runtime check instead of a compile time replacement.
Not to mention that it could lead to the evaluation of an
uninitialized variable as was done in this case.  Replace
sizeof(array index variable) with sizeof(type).

memset() the correct data structure.

ticket: 5394
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19065 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/os/sendto_kdc.c