]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
make it explicit that the uncompressed cached dir items are nul-terminated
authorRoger Dingledine <arma@torproject.org>
Sun, 14 Sep 2008 03:36:54 +0000 (03:36 +0000)
committerRoger Dingledine <arma@torproject.org>
Sun, 14 Sep 2008 03:36:54 +0000 (03:36 +0000)
(they are, but now we should keep them that way)

svn:r16906

src/or/or.h

index 0d0757bc6523c5dc2e6c9834e89d910a5d13c1a2..81345e2f2f3b0c29a4dee7204474bea209b44f69 100644 (file)
@@ -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;