diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-27 16:30:02 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-27 16:30:02 -0400 |
commit | b058f64cc002b44e6dd48616ca3163a01c3f3e14 (patch) | |
tree | 78416b0b0a96cf19e9bd8dff87c3eb03cb0d34ea /src/lib | |
parent | 9e65e7a36f6f7b18164d0e76fe25f0c32b31aaec (diff) | |
download | tor-b058f64cc002b44e6dd48616ca3163a01c3f3e14.tar.gz tor-b058f64cc002b44e6dd48616ca3163a01c3f3e14.zip |
Detect an unlikely integer overflow.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/geoip/country.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/geoip/country.h b/src/lib/geoip/country.h index e4ad0752b3..080c156023 100644 --- a/src/lib/geoip/country.h +++ b/src/lib/geoip/country.h @@ -11,4 +11,6 @@ /** A signed integer representing a country code. */ typedef int16_t country_t; +#define COUNTRY_MAX INT16_MAX + #endif |