diff options
author | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-02-11 08:41:27 -0800 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-02-11 10:00:30 -0800 |
commit | afa71afa6bd6c6d0f34ca3f443178f3b6587e62a (patch) | |
tree | cfab5cd30beea08cc23536da19a96cbf06364f22 | |
parent | ff342091160648e01094dfbd96623ffe6edf7ff7 (diff) | |
download | pycrypto-afa71afa6bd6c6d0f34ca3f443178f3b6587e62a.tar.gz |
SHA2: Don't export symbol 'add_length'
Exporting symbols can cause symbol conflicts with external libraries,
causing the dynamic linker to silently pick one of the implementations,
which can lead to subtle bugs if they're actually different functions.
-rw-r--r-- | src/hash_SHA2_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hash_SHA2_template.c b/src/hash_SHA2_template.c index 81b1ea6..0725967 100644 --- a/src/hash_SHA2_template.c +++ b/src/hash_SHA2_template.c @@ -87,7 +87,7 @@ static void sha_compress(hash_state * hs) * return 1 on success * return 0 if the length overflows */ -int add_length(hash_state *hs, sha2_word_t inc) { +static int add_length(hash_state *hs, sha2_word_t inc) { sha2_word_t overflow_detector; overflow_detector = hs->length_lower; hs->length_lower += inc; |