heimdal: Fix CID 240779 Allocation size mismatch
heimdal: Fix CID 240779 Allocation size mismatch

(rebased on current Heimdal by abartlet)

The error Coverity complains about is in the malloc. krb5_enctypes is
an enum, so it is usually smaller than the size of a pointer. So we
overallocate, but in the memcpy further down we copy from potentially
invalid memory.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 13 11:05:44 CET 2013 on sn-devel-104

madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal