diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-09-28 09:21:38 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-09-28 09:21:38 +0200 |
commit | 7e9b73e098e7876df990a6f2740d4987ebc2f698 (patch) | |
tree | a6bc7151324622715bdcb9918fc990ff2d464d10 /macros.h | |
parent | 4611f79cf2c2d863797de6497e543b7baac8b636 (diff) | |
download | nettle-7e9b73e098e7876df990a6f2740d4987ebc2f698.tar.gz |
MD_PAD: Don't depend on sizeof of the count field(s).
Diffstat (limited to 'macros.h')
-rw-r--r-- | macros.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); \ |