summaryrefslogtreecommitdiff
path: root/source3/libsmb/smbdes.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-07-21 00:32:09 +0000
committerLuke Leighton <lkcl@samba.org>1999-07-21 00:32:09 +0000
commit6a5a4e818684a616306d2954d1a2612113b314a6 (patch)
treee1900e634df995f0a1d36c063645cd4997a9529f /source3/libsmb/smbdes.c
parent46ce0d4619839f40f910eb4a0d2c3da01436bc88 (diff)
downloadsamba-6a5a4e818684a616306d2954d1a2612113b314a6.tar.gz
samba-6a5a4e818684a616306d2954d1a2612113b314a6.tar.bz2
samba-6a5a4e818684a616306d2954d1a2612113b314a6.zip
BDC support.
(This used to be commit 2331aa32ab36c3ee5fd8cfbe972e57299939e33d)
Diffstat (limited to 'source3/libsmb/smbdes.c')
-rw-r--r--source3/libsmb/smbdes.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/smbdes.c b/source3/libsmb/smbdes.c
index 579d0dd8b4..fa7d64cec8 100644
--- a/source3/libsmb/smbdes.c
+++ b/source3/libsmb/smbdes.c
@@ -365,6 +365,10 @@ void SamOEMhash( unsigned char *data, unsigned char *key, int val)
unsigned char index_j = 0;
unsigned char j = 0;
int ind;
+ int len = 0;
+ if (val == 1) len = 516;
+ if (val == 0) len = 16;
+ if (val == 2) len = 68;
for (ind = 0; ind < 256; ind++)
{
@@ -381,7 +385,7 @@ void SamOEMhash( unsigned char *data, unsigned char *key, int val)
s_box[ind] = s_box[j];
s_box[j] = tc;
}
- for( ind = 0; ind < (val ? 516 : 16); ind++)
+ for( ind = 0; ind < len; ind++)
{
unsigned char tc;
unsigned char t;