]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Check for micro < 0, rather than checking "minor" twice.
authorNick Mathewson <nickm@torproject.org>
Fri, 17 Feb 2017 16:31:39 +0000 (11:31 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 17 Feb 2017 16:31:39 +0000 (11:31 -0500)
Bug found with clang scan-build.  Fixes bug on f63e06d3dc6757d.
Bug not present in any released Tor.

src/or/routerparse.c

index 7d9769b49940960e9a18b93eab117c9c25a1eca0..2ee0d2720ee09916f6ef153182917b2c7e756479 100644 (file)
@@ -5551,7 +5551,7 @@ tor_version_parse_platform(const char *platform,
   if (strict) {
     if (router_version->major < 0 ||
         router_version->minor < 0 ||
-        router_version->minor < 0 ||
+        router_version->micro < 0 ||
         router_version->patchlevel < 0 ||
         router_version->svn_revision < 0) {
       return -1;