Commit 765ab31 1 parent 729cd03 commit 765ab31 Copy full SHA for 765ab31
File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,10 @@ namespace osuCrypto
284
284
auto parents = levels[d];
285
285
286
286
// The next level of theGGM tree that we are populating.
287
- auto children = levels[d + 1 ];
287
+ auto children = levels[d + 1 ];
288
+ assert ((u64)level0.data () % sizeof (block) == 0 && " levels requires aligment" );
289
+ assert ((u64)level1.data () % sizeof (block) == 0 && " levels requires aligment" );
290
+
288
291
289
292
// For each child, populate the child by expanding the parent.
290
293
for (u64 parentIdx = 0 , childIdx = 0 ; parentIdx < width; ++parentIdx, childIdx += 2 )
@@ -897,6 +900,8 @@ namespace osuCrypto
897
900
// The next level that we want to construct.
898
901
auto level1 = levels[d + 1 ];
899
902
assert (level1.size () == width * 2 );
903
+ assert ((u64)level0.data () % sizeof (block) == 0 && " levels requires aligment" );
904
+ assert ((u64)level1.data () % sizeof (block) == 0 && " levels requires aligment" );
900
905
901
906
for (u64 parentIdx = 0 , childIdx = 0 ; parentIdx < width; ++parentIdx, childIdx += 2 )
902
907
{
You can’t perform that action at this time.
0 commit comments