Commit 7e9b73e0 authored by Niels Möller's avatar Niels Möller

MD_PAD: Don't depend on sizeof of the count field(s).

parent 4611f79c
2013-09-28 Niels Möller <nisse@lysator.liu.se>
* macros.h (MD_PAD): Use size argument, don't depend on
sizeof of the count field(s).
2013-09-22 Niels Möller <nisse@lysator.liu.se>
* x86_64/gcm-hash8.asm: New file.
......
......@@ -225,7 +225,7 @@ do { \
assert(__md_i < sizeof((ctx)->block)); \
(ctx)->block[__md_i++] = 0x80; \
\
if (__md_i > (sizeof((ctx)->block) - 2*sizeof((ctx)->count_low))) \
if (__md_i > (sizeof((ctx)->block) - (size))) \
{ /* No room for length in this block. Process it and \
pad with another one */ \
memset((ctx)->block + __md_i, 0, sizeof((ctx)->block) - __md_i); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment