]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Type bug in shared_random_state -- make sure Version is int.
authorNick Mathewson <nickm@torproject.org>
Mon, 25 Sep 2017 15:52:57 +0000 (11:52 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 26 Sep 2017 16:25:34 +0000 (12:25 -0400)
The confparse field has type UINT, which corresponds to an int
type.  We had uint32_t.

This shouldn't cause trouble in practice, since int happens to
4-bytes wide on every platform where an authority is running.  It's
still wrong, though.

src/or/shared_random_state.h

index a154eb56363afea67f9cc4e5b577cbe70b9bc2f5..b6af6e1721ff948c04a9e9f962ac8f6b1560e37b 100644 (file)
@@ -77,7 +77,7 @@ typedef struct sr_state_t {
 typedef struct sr_disk_state_t {
   uint32_t magic_;
   /* Version of the protocol. */
-  uint32_t Version;
+  int Version;
   /* Version of our running tor. */
   char *TorVersion;
   /* Creation time of this state */