Make smb_bytes_push_str deal with a NULL buf returning NULL
[nivanova/samba-autobuild/.git] / source3 / libsmb / smbdes.c
index 4869fc54a4256e692331aacf057adf9abc5601a4..8087d66799fb874a9e2727156ce0c3d4dfe17449 100644 (file)
@@ -389,8 +389,9 @@ void des_crypt112_16(unsigned char out[16], unsigned char in[16], const unsigned
 void SamOEMhash( unsigned char *data, const unsigned char key[16], size_t len)
 {
        struct arcfour_state arc4_state;
+       const DATA_BLOB keyblob = data_blob_const(key, 16);
 
-       arcfour_init(&arc4_state, key, 16);
+       arcfour_init(&arc4_state, &keyblob);
        arcfour_crypt_sbox(&arc4_state, data, len);
 }