summaryrefslogtreecommitdiffstats
path: root/src/mac
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1998-06-24 07:16:57 +0000
committerTom Yu <tlyu@mit.edu>1998-06-24 07:16:57 +0000
commit2bb3d540a5687e7c3d84d47c15cc387a21d5ff29 (patch)
tree09ea4f8159d4ecb1c4879288197289973cb58983 /src/mac
parent2b7ad4767bee4b3867c37bcd15161503a5c78db6 (diff)
downloadkrb5-2bb3d540a5687e7c3d84d47c15cc387a21d5ff29.tar.gz
krb5-2bb3d540a5687e7c3d84d47c15cc387a21d5ff29.tar.xz
krb5-2bb3d540a5687e7c3d84d47c15cc387a21d5ff29.zip
* mk_priv.c (krb_mk_priv): Fix up call to pcbc_encrypt(). By
taking the address of key, the 5th arg to pcbc_encrypt() was actually a (char **) cast to a (C_Block *). The reason for this is that a C_Block (actually a des_cblock) is typedef'ed from a char[8], which by being in the parameters of the definition of krb_mk_priv() becomes of type (char *). This means that using the address operator on key resulted in a pointer to a pointer to a char rather than a pointer to a des_cblock, which would have been innocuous in this case because pcbc_encrypt() actually takes a (des_cblock *) as the 5th (ivec) argument. The moral is to never pass around naked arrays as function arguments; instead, pass around pointers to arrays to avoid spontaneous conversions to pointers sneaking up. Note that CNS actually uses a (C_Block *) everywhere, and maybe we should as well. *whew* git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10603 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/mac')
0 files changed, 0 insertions, 0 deletions