diff options
author | Roger Dingledine <arma@torproject.org> | 2008-09-14 03:36:54 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-09-14 03:36:54 +0000 |
commit | 4045ef72f5db967033bd14217eed4bfea4ea9453 (patch) | |
tree | f75c7869e77975ca49abf059c459746b6d3f4c26 | |
parent | 2d95accc75133248d6c3a7c93c5211488f060de6 (diff) | |
download | tor-4045ef72f5db967033bd14217eed4bfea4ea9453.tar.gz tor-4045ef72f5db967033bd14217eed4bfea4ea9453.zip |
make it explicit that the uncompressed cached dir items are nul-terminated
(they are, but now we should keep them that way)
svn:r16906
-rw-r--r-- | src/or/or.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/or.h b/src/or/or.h index 0d0757bc65..81345e2f2f 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1176,11 +1176,11 @@ typedef struct addr_policy_t { /** A cached_dir_t represents a cacheable directory object, along with its * compressed form. */ typedef struct cached_dir_t { - char *dir; /**< Contents of this object */ + char *dir; /**< Contents of this object, nul-terminated. */ char *dir_z; /**< Compressed contents of this object. */ - size_t dir_len; /**< Length of <b>dir</b> */ - size_t dir_z_len; /**< Length of <b>dir_z</b> */ - time_t published; /**< When was this object published */ + size_t dir_len; /**< Length of <b>dir</b> (not counting its nul). */ + size_t dir_z_len; /**< Length of <b>dir_z</b>. */ + time_t published; /**< When was this object published. */ int refcnt; /**< Reference count for this cached_dir_t. */ } cached_dir_t; |