[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [tor/master] Fix bug 1173: remove an assert(unsigned >= 0).



Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue, 15 Dec 2009 15:51:59 -0500
Subject: Fix bug 1173: remove an assert(unsigned >= 0).
Commit: 1c87a27574023096212375329e5c4ba1d82f71ce

---
 ChangeLog           |    2 ++
 src/common/crypto.c |    1 -
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 22da2f7..9f7bc41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,8 @@ Changes in Version 0.2.1.21 - 20??-??-??
     - Fix a couple of very-hard-to-trigger memory leaks, and one hard-to-
       trigger platform-specific option misparsing case found by Coverity
       Scan.
+    - Fix a compilation warning on Fedora 12 by removing an impossible-to-
+      trigger assert.  Fixes bug 1173.
 
 
 Changes in version 0.2.1.20 - 2009-10-15
diff --git a/src/common/crypto.c b/src/common/crypto.c
index da38ddc..8676b6b 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -532,7 +532,6 @@ crypto_pk_write_key_to_string_impl(crypto_pk_env_t *env, char **dest,
   (void)BIO_set_close(b, BIO_NOCLOSE); /* so BIO_free doesn't free buf */
   BIO_free(b);
 
-  tor_assert(buf->length >= 0);
   *dest = tor_malloc(buf->length+1);
   memcpy(*dest, buf->data, buf->length);
   (*dest)[buf->length] = 0; /* nul terminate it */
-- 
1.5.6.5