summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-28 17:02:34 +0100
committerVolker Lendecke <vl@samba.org>2007-12-28 17:02:34 +0100
commit533d6f617efc4dfe1e145785cb9736df07671bdf (patch)
treeaeb094fb712cead751b1e3aa10d85c830a5d931d /source3/rpc_parse
parent4cdce5b50e286aab457611d2c634cb79990795fd (diff)
downloadsamba-533d6f617efc4dfe1e145785cb9736df07671bdf.tar.gz
samba-533d6f617efc4dfe1e145785cb9736df07671bdf.tar.bz2
samba-533d6f617efc4dfe1e145785cb9736df07671bdf.zip
Remove static zeros
(This used to be commit dbcc213710a9af31b6094d4741a6f68f573dcdad)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_prs.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 23dae9f3a1..638d71a73e 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1544,9 +1544,11 @@ static void schannel_digest(struct schannel_auth_struct *a,
uchar digest_final[16])
{
uchar whole_packet_digest[16];
- static const uchar zeros[4] = { 0, };
+ uchar zeros[4];
struct MD5Context ctx3;
-
+
+ ZERO_STRUCT(zeros);
+
/* verfiy the signature on the packet by MD5 over various bits */
MD5Init(&ctx3);
/* use our sequence number, which ensures the packet is not
@@ -1573,11 +1575,13 @@ static void schannel_get_sealing_key(struct schannel_auth_struct *a,
RPC_AUTH_SCHANNEL_CHK *verf,
uchar sealing_key[16])
{
- static const uchar zeros[4] = { 0, };
+ uchar zeros[4];
uchar digest2[16];
uchar sess_kf0[16];
int i;
+ ZERO_STRUCT(zeros);
+
for (i = 0; i < sizeof(sess_kf0); i++) {
sess_kf0[i] = a->sess_key[i] ^ 0xf0;
}
@@ -1600,10 +1604,12 @@ static void schannel_get_sealing_key(struct schannel_auth_struct *a,
static void schannel_deal_with_seq_num(struct schannel_auth_struct *a,
RPC_AUTH_SCHANNEL_CHK *verf)
{
- static const uchar zeros[4] = { 0, };
+ uchar zeros[4];
uchar sequence_key[16];
uchar digest1[16];
+ ZERO_STRUCT(zeros);
+
hmac_md5(a->sess_key, zeros, sizeof(zeros), digest1);
dump_data_pw("(sequence key) digest1:\n", digest1, sizeof(digest1));