diff options
author | Bruno Haible <bruno@clisp.org> | 2017-03-31 22:03:49 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-03-31 22:40:40 +0200 |
commit | 3e7178b337e3a83df9e4f36a4aef516f089e3796 (patch) | |
tree | 6ae4f939bf390ae4e97c1e913ce9cdf4883a5866 /lib/md5.h | |
parent | 948db16eee9dc2f39c14ec297bb06adad5b344a6 (diff) | |
download | gnulib-3e7178b337e3a83df9e4f36a4aef516f089e3796.tar.gz |
md5, sha1, sha256, sha512: Add comments regarding correctness.
* lib/md5.h (buflen): Add comments regarding range.
* lib/sha1.h (buflen): Likewise.
* lib/sha256.h (buflen): Likewise.
* lib/sha512.h (buflen): Likewise.
* lib/md5.c (md5_process_bytes): Add comment why memmove is not needed.
* lib/sha1.c (sha1_process_bytes): Likewise.
* lib/sha256.c (sha256_process_bytes): Likewise.
* lib/sha512.c (sha512_process_bytes): Likewise.
Reported by Coverity via Tim Rühsen.
Diffstat (limited to 'lib/md5.h')
-rw-r--r-- | lib/md5.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -74,8 +74,8 @@ struct md5_ctx uint32_t D; uint32_t total[2]; - uint32_t buflen; - uint32_t buffer[32]; + uint32_t buflen; /* ≥ 0, ≤ 128 */ + uint32_t buffer[32]; /* 128 bytes; the first buflen bytes are in use */ }; /* |