summaryrefslogtreecommitdiff
path: root/macros.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-09-28 09:21:38 +0200
committerNiels Möller <nisse@lysator.liu.se>2013-09-28 09:21:38 +0200
commit7e9b73e098e7876df990a6f2740d4987ebc2f698 (patch)
treea6bc7151324622715bdcb9918fc990ff2d464d10 /macros.h
parent4611f79cf2c2d863797de6497e543b7baac8b636 (diff)
downloadnettle-7e9b73e098e7876df990a6f2740d4987ebc2f698.tar.gz
MD_PAD: Don't depend on sizeof of the count field(s).
Diffstat (limited to 'macros.h')
-rw-r--r--macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/macros.h b/macros.h
index c471c26d..fb814239 100644
--- a/macros.h
+++ b/macros.h
@@ -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); \