projects
/
tfcrypt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0d3bb4
)
tfprng: use tf_prng_datasize even if no one uses it.
author
Andrey Rys
<rys@lynxlynx.ru>
Fri, 15 Mar 2019 10:27:56 +0000
(17:27 +0700)
committer
Andrey Rys
<rys@lynxlynx.ru>
Fri, 15 Mar 2019 10:29:35 +0000
(17:29 +0700)
VERSION
patch
|
blob
|
history
tfprng.c
patch
|
blob
|
history
diff --git
a/VERSION
b/VERSION
index b1bd38b62a0800a4f6a80c34e21c5acffae52c7e..8351c19397f4fcd5238d10034fa7fa384f14d580 100644
(file)
--- a/
VERSION
+++ b/
VERSION
@@
-1
+1
@@
-1
3
+1
4
diff --git
a/tfprng.c
b/tfprng.c
index 24de6fd657a179a9aae7f2bc9e7b49199902799e..d4370f31172d0093f487ca07395a85a7286a317d 100644
(file)
--- a/
tfprng.c
+++ b/
tfprng.c
@@
-19,7
+19,7
@@
void tf_prng_seedkey_r(void *sdata, const void *skey)
TF_UNIT_TYPE k[TF_NR_KEY_UNITS];
struct tf_prng_data *rprng = sdata;
- memset(rprng, 0,
sizeof(struct tf_prng_data
));
+ memset(rprng, 0,
tf_prng_datasize(
));
if (!skey) return;
memcpy(k, skey, TF_KEY_SIZE);
@@
-52,7
+52,7
@@
void tf_prng_seed_r(void *sdata, TF_UNIT_TYPE seed)
struct tf_prng_data *rprng = sdata;
size_t x;
- memset(rprng, 0,
sizeof(struct tf_prng_data
));
+ memset(rprng, 0,
tf_prng_datasize(
));
for (x = 0; x < TF_NR_KEY_UNITS; x++) k[x] = seed;
tfe_init(&rprng->tfe, k);
rprng->init = 1;