heimdal: Fix CID 240779 Allocation size mismatch
authorVolker Lendecke <vl@samba.org>
Tue, 12 Nov 2013 21:00:54 +0000 (22:00 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 13 Nov 2013 10:05:44 +0000 (11:05 +0100)
commit55b3d870361684a1eedc215fdb68b3051079047e
treeaff3ce38d8675852d009fbdf5ada551399c3c6bc
parent91b04f708f790447552dc196e2bc0d2ae2e4379d
heimdal: Fix CID 240779 Allocation size mismatch

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
source4/heimdal/lib/krb5/context.c