diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-04-26 13:00:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-04-26 13:03:58 -0400 |
commit | 43ffd023e9267927539dc9c12bee86199cd1c800 (patch) | |
tree | a1eb428d7470f916154bec88ec5539892ab75aa1 /src/common/crypto.c | |
parent | e98583594d897ac32745061143e565c6f4b45f97 (diff) | |
download | tor-43ffd023e9267927539dc9c12bee86199cd1c800.tar.gz tor-43ffd023e9267927539dc9c12bee86199cd1c800.zip |
Make SIZE_T_CEILING unsigned; add a signed SSIZE_T_CEILING
None of the comparisons were _broken_ previously, but avoiding
signed/unsigned comparisons makes everybody happier.
Fixes bug2475.
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r-- | src/common/crypto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 48c8dea08f..838347e20e 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -452,7 +452,7 @@ crypto_pk_read_private_key_from_string(crypto_pk_env_t *env, tor_assert(env); tor_assert(s); - tor_assert(len < INT_MAX && len < SIZE_T_CEILING); + tor_assert(len < INT_MAX && len < SSIZE_T_CEILING); /* Create a read-only memory BIO, backed by the string 's' */ b = BIO_new_mem_buf((char*)s, (int)len); |