geoip2_c 0.3.4 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +23 -0
  3. data/.github/workflows/ubuntu.yml +17 -8
  4. data/.github/workflows/windows.yml +18 -8
  5. data/.gitmodules +0 -3
  6. data/ext/geoip2/extconf.rb +9 -25
  7. data/ext/geoip2/geoip2.c +82 -32
  8. data/geoip2_c.gemspec +1 -0
  9. data/lib/geoip2/version.rb +1 -1
  10. metadata +18 -182
  11. data/ext/geoip2/libmaxminddb/.gitignore +0 -38
  12. data/ext/geoip2/libmaxminddb/.gitmodules +0 -9
  13. data/ext/geoip2/libmaxminddb/.perltidyrc +0 -11
  14. data/ext/geoip2/libmaxminddb/.travis.yml +0 -70
  15. data/ext/geoip2/libmaxminddb/.uncrustify.cfg +0 -78
  16. data/ext/geoip2/libmaxminddb/AUTHORS +0 -0
  17. data/ext/geoip2/libmaxminddb/Changes.md +0 -277
  18. data/ext/geoip2/libmaxminddb/LICENSE +0 -202
  19. data/ext/geoip2/libmaxminddb/Makefile.am +0 -41
  20. data/ext/geoip2/libmaxminddb/NOTICE +0 -13
  21. data/ext/geoip2/libmaxminddb/README.dev.md +0 -69
  22. data/ext/geoip2/libmaxminddb/README.md +0 -122
  23. data/ext/geoip2/libmaxminddb/appveyor.yml +0 -33
  24. data/ext/geoip2/libmaxminddb/bin/Makefile.am +0 -10
  25. data/ext/geoip2/libmaxminddb/bin/mmdblookup.c +0 -715
  26. data/ext/geoip2/libmaxminddb/bootstrap +0 -21
  27. data/ext/geoip2/libmaxminddb/common.mk +0 -7
  28. data/ext/geoip2/libmaxminddb/configure.ac +0 -132
  29. data/ext/geoip2/libmaxminddb/dev-bin/make-man-pages.pl +0 -76
  30. data/ext/geoip2/libmaxminddb/dev-bin/ppa-release.sh +0 -53
  31. data/ext/geoip2/libmaxminddb/dev-bin/regen-prototypes.pl +0 -136
  32. data/ext/geoip2/libmaxminddb/dev-bin/regen-win32-test-projs.pl +0 -54
  33. data/ext/geoip2/libmaxminddb/dev-bin/release.sh +0 -113
  34. data/ext/geoip2/libmaxminddb/dev-bin/uncrustify-all.sh +0 -21
  35. data/ext/geoip2/libmaxminddb/dev-bin/valgrind-all.pl +0 -53
  36. data/ext/geoip2/libmaxminddb/doc/libmaxminddb.md +0 -889
  37. data/ext/geoip2/libmaxminddb/doc/mmdblookup.md +0 -103
  38. data/ext/geoip2/libmaxminddb/include/maxminddb.h +0 -241
  39. data/ext/geoip2/libmaxminddb/include/maxminddb_config.h.in +0 -14
  40. data/ext/geoip2/libmaxminddb/projects/VS12/README.md +0 -59
  41. data/ext/geoip2/libmaxminddb/projects/VS12/libmaxminddb-release.props +0 -32
  42. data/ext/geoip2/libmaxminddb/projects/VS12/libmaxminddb-x64.props +0 -14
  43. data/ext/geoip2/libmaxminddb/projects/VS12/libmaxminddb.props +0 -32
  44. data/ext/geoip2/libmaxminddb/projects/VS12/libmaxminddb.sln +0 -150
  45. data/ext/geoip2/libmaxminddb/projects/VS12/libmaxminddb.vcxproj +0 -143
  46. data/ext/geoip2/libmaxminddb/projects/VS12/libmaxminddb.vcxproj.filters +0 -32
  47. data/ext/geoip2/libmaxminddb/projects/VS12/maxminddb_config.h +0 -14
  48. data/ext/geoip2/libmaxminddb/projects/VS12-tests/bad_pointers.vcxproj +0 -105
  49. data/ext/geoip2/libmaxminddb/projects/VS12-tests/basic_lookup.vcxproj +0 -105
  50. data/ext/geoip2/libmaxminddb/projects/VS12-tests/data_entry_list.vcxproj +0 -105
  51. data/ext/geoip2/libmaxminddb/projects/VS12-tests/data_types.vcxproj +0 -105
  52. data/ext/geoip2/libmaxminddb/projects/VS12-tests/dump.vcxproj +0 -105
  53. data/ext/geoip2/libmaxminddb/projects/VS12-tests/get_value.vcxproj +0 -105
  54. data/ext/geoip2/libmaxminddb/projects/VS12-tests/get_value_pointer_bug.vcxproj +0 -105
  55. data/ext/geoip2/libmaxminddb/projects/VS12-tests/ipv4_start_cache.vcxproj +0 -105
  56. data/ext/geoip2/libmaxminddb/projects/VS12-tests/ipv6_lookup_in_ipv4.vcxproj +0 -105
  57. data/ext/geoip2/libmaxminddb/projects/VS12-tests/libtap.vcxproj +0 -85
  58. data/ext/geoip2/libmaxminddb/projects/VS12-tests/maxminddb_test_helper.vcxproj +0 -107
  59. data/ext/geoip2/libmaxminddb/projects/VS12-tests/metadata.vcxproj +0 -105
  60. data/ext/geoip2/libmaxminddb/projects/VS12-tests/metadata_pointers.vcxproj +0 -105
  61. data/ext/geoip2/libmaxminddb/projects/VS12-tests/no_map_get_value.vcxproj +0 -105
  62. data/ext/geoip2/libmaxminddb/projects/VS12-tests/read_node.vcxproj +0 -105
  63. data/ext/geoip2/libmaxminddb/projects/VS12-tests/shared.vcxproj +0 -104
  64. data/ext/geoip2/libmaxminddb/projects/VS12-tests/threads.vcxproj +0 -103
  65. data/ext/geoip2/libmaxminddb/projects/VS12-tests/version.vcxproj +0 -105
  66. data/ext/geoip2/libmaxminddb/projects/test.vcxproj.template +0 -105
  67. data/ext/geoip2/libmaxminddb/src/Makefile.am +0 -25
  68. data/ext/geoip2/libmaxminddb/src/data-pool.c +0 -180
  69. data/ext/geoip2/libmaxminddb/src/data-pool.h +0 -52
  70. data/ext/geoip2/libmaxminddb/src/libmaxminddb.pc.in +0 -11
  71. data/ext/geoip2/libmaxminddb/src/maxminddb-compat-util.h +0 -167
  72. data/ext/geoip2/libmaxminddb/src/maxminddb.c +0 -2181
  73. data/ext/geoip2/libmaxminddb/t/Makefile.am +0 -27
  74. data/ext/geoip2/libmaxminddb/t/bad_databases_t.c +0 -67
  75. data/ext/geoip2/libmaxminddb/t/bad_pointers_t.c +0 -53
  76. data/ext/geoip2/libmaxminddb/t/basic_lookup_t.c +0 -207
  77. data/ext/geoip2/libmaxminddb/t/compile_c++_t.pl +0 -107
  78. data/ext/geoip2/libmaxminddb/t/data-pool-t.c +0 -374
  79. data/ext/geoip2/libmaxminddb/t/data_entry_list_t.c +0 -353
  80. data/ext/geoip2/libmaxminddb/t/data_types_t.c +0 -439
  81. data/ext/geoip2/libmaxminddb/t/dump_t.c +0 -103
  82. data/ext/geoip2/libmaxminddb/t/external_symbols_t.pl +0 -106
  83. data/ext/geoip2/libmaxminddb/t/get_value_pointer_bug_t.c +0 -66
  84. data/ext/geoip2/libmaxminddb/t/get_value_t.c +0 -249
  85. data/ext/geoip2/libmaxminddb/t/ipv4_start_cache_t.c +0 -36
  86. data/ext/geoip2/libmaxminddb/t/ipv6_lookup_in_ipv4_t.c +0 -48
  87. data/ext/geoip2/libmaxminddb/t/libtap/.gitignore +0 -13
  88. data/ext/geoip2/libmaxminddb/t/libtap/.travis.yml +0 -13
  89. data/ext/geoip2/libmaxminddb/t/libtap/COPYING +0 -165
  90. data/ext/geoip2/libmaxminddb/t/libtap/INSTALL +0 -41
  91. data/ext/geoip2/libmaxminddb/t/libtap/Makefile +0 -72
  92. data/ext/geoip2/libmaxminddb/t/libtap/Makefile.win +0 -37
  93. data/ext/geoip2/libmaxminddb/t/libtap/README.md +0 -268
  94. data/ext/geoip2/libmaxminddb/t/libtap/t/cmp_mem.c +0 -20
  95. data/ext/geoip2/libmaxminddb/t/libtap/t/cmp_mem.expected +0 -28
  96. data/ext/geoip2/libmaxminddb/t/libtap/t/cmpok.c +0 -16
  97. data/ext/geoip2/libmaxminddb/t/libtap/t/cmpok.expected +0 -37
  98. data/ext/geoip2/libmaxminddb/t/libtap/t/diag.c +0 -10
  99. data/ext/geoip2/libmaxminddb/t/libtap/t/diag.expected +0 -2
  100. data/ext/geoip2/libmaxminddb/t/libtap/t/diesok.c +0 -14
  101. data/ext/geoip2/libmaxminddb/t/libtap/t/diesok.expected +0 -6
  102. data/ext/geoip2/libmaxminddb/t/libtap/t/is.c +0 -24
  103. data/ext/geoip2/libmaxminddb/t/libtap/t/is.expected +0 -58
  104. data/ext/geoip2/libmaxminddb/t/libtap/t/like.c +0 -10
  105. data/ext/geoip2/libmaxminddb/t/libtap/t/like.expected +0 -4
  106. data/ext/geoip2/libmaxminddb/t/libtap/t/simple.c +0 -31
  107. data/ext/geoip2/libmaxminddb/t/libtap/t/simple.expected +0 -32
  108. data/ext/geoip2/libmaxminddb/t/libtap/t/skip.c +0 -23
  109. data/ext/geoip2/libmaxminddb/t/libtap/t/skip.expected +0 -9
  110. data/ext/geoip2/libmaxminddb/t/libtap/t/synopsis.c +0 -13
  111. data/ext/geoip2/libmaxminddb/t/libtap/t/synopsis.expected +0 -9
  112. data/ext/geoip2/libmaxminddb/t/libtap/t/test.c +0 -28
  113. data/ext/geoip2/libmaxminddb/t/libtap/t/todo.c +0 -17
  114. data/ext/geoip2/libmaxminddb/t/libtap/t/todo.expected +0 -11
  115. data/ext/geoip2/libmaxminddb/t/libtap/tap.c +0 -354
  116. data/ext/geoip2/libmaxminddb/t/libtap/tap.h +0 -115
  117. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitattributes +0 -1
  118. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitconfig +0 -2
  119. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitignore +0 -2
  120. data/ext/geoip2/libmaxminddb/t/maxmind-db/.perltidyallrc +0 -11
  121. data/ext/geoip2/libmaxminddb/t/maxmind-db/.tidyallrc +0 -7
  122. data/ext/geoip2/libmaxminddb/t/maxmind-db/LICENSE +0 -4
  123. data/ext/geoip2/libmaxminddb/t/maxmind-db/MaxMind-DB-spec.md +0 -558
  124. data/ext/geoip2/libmaxminddb/t/maxmind-db/README.md +0 -4
  125. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/README.md +0 -7
  126. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/libmaxminddb/libmaxminddb-offset-integer-overflow.mmdb +0 -0
  127. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/cyclic-data-structure.mmdb +0 -0
  128. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-bytes-length.mmdb +0 -1
  129. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-data-record-offset.mmdb +0 -0
  130. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-map-key-length.mmdb +0 -0
  131. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-string-length.mmdb +0 -1
  132. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/metadata-is-an-uint128.mmdb +0 -1
  133. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/unexpected-bytes.mmdb +0 -0
  134. data/ext/geoip2/libmaxminddb/t/maxmind-db/perltidyrc +0 -12
  135. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Anonymous-IP-Test.json +0 -32
  136. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-City-Test.json +0 -12616
  137. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Connection-Type-Test.json +0 -102
  138. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Country-Test.json +0 -10975
  139. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-DensityIncome-Test.json +0 -14
  140. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Domain-Test.json +0 -452
  141. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Enterprise-Test.json +0 -666
  142. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-ISP-Test.json +0 -12585
  143. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Precision-Enterprise-Test.json +0 -1035
  144. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoLite2-ASN-Test.json +0 -37
  145. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/README +0 -13
  146. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Anonymous-IP-Test.mmdb +0 -0
  147. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test-Broken-Double-Format.mmdb +0 -0
  148. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test-Invalid-Node-Count.mmdb +0 -0
  149. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test.mmdb +0 -0
  150. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Connection-Type-Test.mmdb +0 -0
  151. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Country-Test.mmdb +0 -0
  152. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-DensityIncome-Test.mmdb +0 -0
  153. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Domain-Test.mmdb +0 -0
  154. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Enterprise-Test.mmdb +0 -0
  155. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-ISP-Test.mmdb +0 -0
  156. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Precision-Enterprise-Test.mmdb +0 -0
  157. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoLite2-ASN-Test.mmdb +0 -0
  158. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb +0 -0
  159. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-string-value-entries.mmdb +0 -0
  160. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-broken-pointers-24.mmdb +0 -0
  161. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-broken-search-tree-24.mmdb +0 -0
  162. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb +0 -0
  163. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-24.mmdb +0 -0
  164. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-28.mmdb +0 -0
  165. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-32.mmdb +0 -0
  166. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-24.mmdb +0 -0
  167. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-28.mmdb +0 -0
  168. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-32.mmdb +0 -0
  169. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-metadata-pointers.mmdb +0 -0
  170. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-24.mmdb +0 -0
  171. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-28.mmdb +0 -0
  172. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb +0 -0
  173. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-nested.mmdb +0 -0
  174. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/README.md +0 -26
  175. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/maps-with-pointers.raw +0 -0
  176. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/write-test-data.pl +0 -614
  177. data/ext/geoip2/libmaxminddb/t/maxmind-db/tidyall.ini +0 -5
  178. data/ext/geoip2/libmaxminddb/t/maxminddb_test_helper.c +0 -255
  179. data/ext/geoip2/libmaxminddb/t/maxminddb_test_helper.h +0 -69
  180. data/ext/geoip2/libmaxminddb/t/metadata_pointers_t.c +0 -32
  181. data/ext/geoip2/libmaxminddb/t/metadata_t.c +0 -226
  182. data/ext/geoip2/libmaxminddb/t/mmdblookup_t.pl +0 -158
  183. data/ext/geoip2/libmaxminddb/t/no_map_get_value_t.c +0 -32
  184. data/ext/geoip2/libmaxminddb/t/read_node_t.c +0 -157
  185. data/ext/geoip2/libmaxminddb/t/threads_t.c +0 -196
  186. data/ext/geoip2/libmaxminddb/t/version_t.c +0 -10
@@ -1,277 +0,0 @@
1
- ## 1.3.2 - 2018-01-17
2
-
3
- * Allocate memory for `MMDB_entry_data_list_s` structs in separate chunks
4
- rather than one large chunk. This simplifies accessing memory in
5
- `MMDB_get_entry_data_list()` and increases performance. It builds on the
6
- changes in 1.3.0 and 1.3.1.
7
- * We no longer export `data_pool_*` symbols. These are internal functions
8
- but we were previously exporting them. Pull request by Faidon Liambotis.
9
- GitHub #162.
10
- * Build with POSIX.1-2008 by default if the system supports it. This allows
11
- use of `open()` with `O_CLOEXEC`. We retain support for systems that
12
- provide only POSIX.1-2001.
13
- * Open the database with the `O_CLOEXEC` flag if the system provides it.
14
- This avoids cases where we could leak fds when called in multi-threaded
15
- programs that `fork()` and `exec()`. Original report and PR by Brandon L
16
- Black.
17
- * Added a test to ensure we export only intended symbols (e.g. MMDB_*).
18
-
19
-
20
- ## 1.3.1 - 2017-11-24
21
-
22
- * Fix build problems related to `rpl_malloc()`. Pull request by Rainer
23
- Gerhards. GitHub #152.
24
- * Fix a race to set and read data in a field on the `MMDB_s` struct
25
- (`ipv4_start_node`). GitHub #153.
26
- * Fix cases of invalid memory access when using
27
- `MMDB_get_entry_data_list()`. This was introduced in 1.3.0 and occurred
28
- when performing large lookups. GitHub #153.
29
-
30
-
31
- ## 1.3.0 - 2017-11-10
32
-
33
- * Perform fewer memory allocations in `MMDB_get_entry_data_list()`. This
34
- significantly improves its performance. GitHub #147.
35
- * Fix `mmdblookup`'s build epoch reporting on some systems. Big endian
36
- systems with a 32-bit `time_t` no longer show a database build date of
37
- 1970-01-01 00:00:00. Pull request by Rainer Jung. GitHub #143.
38
-
39
-
40
- ## 1.2.1 - 2017-05-15
41
-
42
- * Use autoconf to check the system's endianness rather than trying to do this
43
- with compiler-defined macros like `__BYTE_ORDER__`. Apparently this didn't
44
- work properly on a Sparc system. GitHub #120.
45
- * Several compiler warnings on Visual C++ were fixed. Pull request by Marcel
46
- Raad. GitHub #130.
47
- * Fix segmentation faults found in `MMDB_open()` using afl-fuzz. This
48
- occurred on corrupt databases that had a data pointer large enough to
49
- cause an integer overflow when doing bound checking. Reported by Ryan
50
- Whitworth. GitHub #140.
51
- * Add --disable-tests option to `configure`. Pull request by Fabrice
52
- Fontaine. GitHub #136.
53
-
54
-
55
- ## 1.2.0 - 2016-03-23
56
-
57
- * Four additional fields were added to the end of the `MMDB_search_node_s`
58
- struct returned by `MMDB_read_node`. These fields allow the user to iterate
59
- through the search tree without making undocumented assumptions about how
60
- this library works internally and without knowing the specific details of
61
- the database format. GitHub #110.
62
-
63
-
64
- ## 1.1.5 - 2016-03-20
65
-
66
- * Previously, reading a database with a pointer in the metadata would cause an
67
- `MMDB_INVALID_METADATA_ERROR` to be returned. This was due to an invalid
68
- offset being used when calculating the pointer. The `data_section` and
69
- `metadata_section` fields now both point to the beginning of the data
70
- section. Previously, `data_section` pointed to the beginning of the data
71
- separator. This will not affect anyone using only documented fields from
72
- `MMDB_s`.
73
- * `MMDB_lookup_sockaddr` will set `mmdb_error` to
74
- `MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR` if an IPv6 `sockaddr` is looked up
75
- in an IPv4-only database. Previously only `MMDB_lookup_string` would set
76
- this error code.
77
- * When resolving an address, this library now relies on `getaddrinfo` to
78
- determine the address family rather than trying to guess it itself.
79
-
80
-
81
- ## 1.1.4 - 2016-01-06
82
-
83
- * Packaging fixes. The 1.1.3 tarball release contained a lot of extra junk in
84
- the t/ directory.
85
-
86
-
87
- ## 1.1.3 - 2016-01-05
88
-
89
- * Added several additional checks to make sure that we don't attempt to read
90
- past the end of the databases's data section. Implemented by Tobias
91
- Stoeckmann. GitHub #103.
92
- * When searching for the database metadata, there was a bug that caused the
93
- code to think it had found valid metadata when none existed. In addition,
94
- this could lead to an attempt to read past the end of the database
95
- entirely. Finally, if there are multiple metadata markers in the database,
96
- we treat the final one as the start of the metdata, instead of the first.
97
- Implemented by Tobias Stoeckmann. GitHub #102.
98
- * Don't attempt to mmap a file that is too large to be mmapped on the
99
- system. Implemented by Tobias Stoeckmann. GitHub #101.
100
- * Added a missing out of memory check when reading a file's
101
- metadata. Implemented by Tobias Stoeckmann. GitHub #101.
102
- * Added several additional checks to make sure that we never attempt to
103
- `malloc` more than `SIZE_MAX` memory, which would lead to integer
104
- overflow. This could only happen with pathological databases. Implemented by
105
- Tobias Stoeckmann. GitHub #101.
106
-
107
-
108
- ## 1.1.2 - 2015-11-16
109
-
110
- * IMPORTANT: This release includes a number of important security fixes. Among
111
- these fixes is improved validation of the database metadata. Unfortunately,
112
- MaxMind GeoIP2 and GeoLite2 databases created earlier than January 28, 2014
113
- had an invalid data type for the `record_size` in the metadata. Previously
114
- these databases worked on little endian machines with libmaxminddb but did
115
- not work on big endian machines. Due to increased safety checks when reading
116
- the file, these databases will no longer work on any platform. If you are
117
- using one of these databases, we recommend that you upgrade to the latest
118
- GeoLite2 or GeoIP2 database
119
- * Added pkg-config support. If your system supports it, then running `make
120
- install` now installs a `libmaxminddb.pc` file for pkgconfig. Implemented by
121
- Jan Vcelak.
122
- * Several segmentation faults found with afl-fuzz were fixed. These were
123
- caused by missing bounds checking and missing data type verification checks.
124
- * `MMDB_get_entry_data_list` will now fail on data structures with a depth
125
- greater than 512 and data structures that are cyclic. This should not
126
- affect any known MaxMind DB in production. All databases produced by
127
- MaxMind have a depth of less than five.
128
-
129
-
130
- ## 1.1.1 - 2015-07-22
131
-
132
- * Added `maxminddb-compat-util.h` as a source file to dist.
133
-
134
-
135
- ## 1.1.0 - 2015-07-21
136
-
137
- * Previously, when there was an error in `MMDB_open()`, `errno` would
138
- generally be overwritten during cleanup, preventing a useful value from
139
- being returned to the caller. This was changed so that the `errno` value
140
- from the function call that caused the error is restored before returning to
141
- the caller. In particular, this is important for `MMDB_IO_ERROR` errors as
142
- checking `errno` is often the only way to determine what actually failed.
143
- * If `mmap()` fails due to running out of memory space, an
144
- `MMDB_OUT_OF_MEMORY_ERROR` is now returned from `MMDB_open` rather than an
145
- `MMDB_IO_ERROR`.
146
- * On Windows, the `CreateFileMappingA()` handle was not properly closed if
147
- opening the database succeeded. Fixed by Bly Hostetler. GitHub #75 & #76.
148
- * On Windows, we were not checking the return value of `CreateFileMappingA()`
149
- properly for errors. Fixed by Bly Hotetler. GitHub #78.
150
- * Several warnings from Clang's scan-build were fixed. GitHub #86.
151
- * All headers are now installed in `$(includedir)`. GitHub #89.
152
- * We no longer install `maxminddb-compat-util.h`. This header was intended for
153
- internal use only.
154
-
155
-
156
- ## 1.0.4 - 2015-01-02
157
-
158
- * If you used a non-integer string as an array index when doing a lookup with
159
- `MMDB_get_value()`, `MMDB_vget_value()`, or `MMDB_aget_value()`, the first
160
- element of the array would be returned rather than an error. A
161
- `MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR` error will now be returned.
162
- GitHub #61.
163
- * If a number larger than `LONG_MAX` was used in the same functions,
164
- `LONG_MAX` would have been used in the lookup. Now a
165
- `MMDB_INVALID_LOOKUP_PATH_ERROR` error will be returned.
166
- * Visual Studio build files were added for unit tests and some compatibility
167
- issues with the tests were fixed.
168
- * Visual Studio project was updated to use property pages. Patch by Andre.
169
- GitHub #69.
170
- * A test failure in `t/compile_c++_t.pl` on new installs was fixed.
171
-
172
-
173
- ## 1.0.3 - 2014-12-02
174
-
175
- * A memory and file handle leak on Win32 was fixed when getting the database
176
- size fails. Patch by Federico G. Schwindt. GitHub PR #49.
177
- * Documentation fix. Federico G. Schwindt. GitHub PR #50.
178
- * Added Visual Studio build files and fixed incorrect CreateFileMappingA
179
- usage. Patch by Andre. GitHub #52.
180
- * The includes for the Windows header files were made lowercase in order to
181
- match the actual file names on case-sensitive file systems. GitHub PR #57.
182
- * Removed `realloc()` calls that caused warnings on Windows and generally
183
- cleaned up memory allocation in `MMDB_vget_value()`. See relevant discussion
184
- in GitHub #52.
185
- * Added an `extern "C" { ... }` wrapper to maxminddb.h when compiling with a
186
- C++ compiler. GitHub #55.
187
-
188
-
189
- ## 1.0.2 - 2014-09-22
190
-
191
- * Fixed a number of small issues found by Coverity.
192
- * When freeing the MMDB struct in `MMDB_close()` we make sure to set the
193
- pointers to NULL after freeing the memory they point to. This makes it safe
194
- to call `MMDB_close` more than once on the same `MMDB_s` struct
195
- pointer. Before this change, calling this function twice on the same pointer
196
- could cause the code to free memory that belonged to something else in the
197
- process. Patch by Shuxin Yang. GitHub PR #41.
198
-
199
-
200
- ## 1.0.1 - 2014-09-03
201
-
202
- * Added missing LICENSE and NOTICE files to distribution. No code changes.
203
-
204
-
205
- ## 1.0.0 - 2014-09-02
206
-
207
- * Bumped version to 1.0.0. No code changes.
208
-
209
-
210
- ## 0.5.6 - 2014-07-21
211
-
212
- * There was a leak in the `MMDB_open()` sub when it was called against a file
213
- which did not contain any MMDB metadata. Reported by Federico
214
- G. Schwindt. GitHub issue #36.
215
- * Fixed an error that occurred when passing AI_V4MAPPED to `getaddrinfo()` on
216
- FreeBSD. Apparently this macro is defined but doesn't work the way we
217
- expected it to on that platform.
218
- * Made sure to call `freeaddrinfo()` when a call to `getaddrinfo()` fails but
219
- still allocated memory.
220
- * Fixed a segfault in the tests that occurred on FreeBSD if we passed a NULL
221
- value to `freeaddrinfo()`.
222
- * Added a missing step to the README.md file for installing from our GitHub
223
- repository. Patch by Yasith Fernando.
224
- * Added instructions for installing via Homebrew. Patch by Yasith Fernando.
225
-
226
-
227
- ## 0.5.5 - 2014-03-11
228
-
229
- * The previous tarball failed to compile because it was missing the
230
- src/maxminddb-compat-util.h file. Reported by Günter Grodotzki. GitHub issue
231
- #18.
232
-
233
-
234
- ## 0.5.4 - 2014-03-03
235
-
236
- * Added support for compiling in the MinGW environment. Patch by Michael
237
- Eisendle.
238
- * Added const declarations to many spots in the public API. None of these
239
- should require changes to existing code.
240
- * Various documentation improvements.
241
- * Changed the license to the Apache 2.0 license.
242
-
243
-
244
- ## 0.5.3 - 2013-12-23
245
-
246
- * The internal value_for_key_as_uint16 method was returning a uint32_t instead
247
- of a uint16_t. Reported by Robert Wells. GitHub issue #11.
248
- * The ip_version member of the MMDB_metadata_s struct was a uint8_t, even
249
- though the docs and spec said it should be a uint16_t. Reported by Robert
250
- Wells. GitHub issue #11.
251
- * The mmdblookup_t.pl test now reports that it needs IPC::Run3 to run (which
252
- it always did, but it didn't tell you this). Patch by Elan Ruusamäe. GitHub
253
- issue #10.
254
-
255
-
256
- ## 0.5.2 - 2013-11-20
257
-
258
- * Running `make` from the tarball failed. This is now fixed.
259
-
260
-
261
- ## 0.5.1 - 2013-11-20
262
-
263
- * Renamed MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA define to
264
- MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR for consistency. Fixes github
265
- issue #5. Reported by Albert Strasheim.
266
- * Updated README.md to show git clone with --recursive flag so you get the
267
- needed submodules. Fixes github issue #4. Reported by Ryan Peck.
268
- * Fixed some bugs with the MMDB_get_*value functions when navigating a data
269
- structure that included pointers. Fixes github issue #3. Reported by
270
- bagadon.
271
- * Fixed compilation problems on OSX and OpenBSD. We have tested this on OSX
272
- and OpenBSD 5.4. Fixes github issue #6.
273
- * Removed some unneeded memory allocations and added const to many variable
274
- declarations. Based on patches by Timo Teräs. Github issue #8.
275
- * Added a test that uses threads to check for thread safety issue in the
276
- library.
277
- * Distro tarball now includes man pages, tests, and test data
@@ -1,202 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
@@ -1,41 +0,0 @@
1
-
2
- include_HEADERS = include/maxminddb.h
3
-
4
- nodist_include_HEADERS = include/maxminddb_config.h
5
-
6
- SUBDIRS = \
7
- src \
8
- bin
9
-
10
- if TESTS
11
- SUBDIRS += \
12
- t
13
- endif
14
-
15
- EXTRA_DIST = doc t Changes.md LICENSE NOTICE README.md projects/VS12 projects/VS12-tests
16
- dist-hook:
17
- dev-bin/make-man-pages.pl $(distdir)
18
- find $(distdir) -name '.git*' | xargs rm -fr
19
-
20
- safedist: clean dist
21
- tmpdir="$${TMPDIR-/tmp}/safedist-$$$$" \
22
- && mkdir "$$tmpdir" \
23
- && tar -xvf $(distdir).tar.gz --directory "$$tmpdir" \
24
- && $(am__cd) "$$tmpdir/$(distdir)" \
25
- && ./configure \
26
- && make -j 4 check
27
-
28
- man1_MANS = man/man1/*.1
29
-
30
- man3_MANS = man/man3/*.3
31
-
32
- man/man1/*.1:
33
- if [ ! -f man/man1/mmdblookup.1 ]; then mkdir -p man/man1 && touch man/man1/mmdblookup.1; fi
34
-
35
- man/man3/*.3:
36
- if [ ! -f man/man3/libmaxminddb.3 ]; then mkdir -p man/man3 && touch man/man3/libmaxminddb.3; fi
37
-
38
- release:
39
- dev-bin/make-release.sh
40
-
41
- .PHONY: man/man1/*.1 man/man3/*.3 release
@@ -1,13 +0,0 @@
1
- Copyright 2013-2014 MaxMind, Inc.
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
@@ -1,69 +0,0 @@
1
- # Releasing this library
2
-
3
- We release by uploading the tarball to GitHub, uploading Ubuntu PPAs, and by
4
- updating the Homebrew recipe for this library.
5
-
6
- ## Creating the release tarball
7
- You may want to refer to the section about prerequisites.
8
-
9
- * Check whether there are any open issues to fix while you're doing this.
10
- * Update `Changes.md` to include specify the new version, today's date, and
11
- list relevant changes. Commit this.
12
- * Run `./dev-bin/release.sh` to update various files in the distro, our
13
- GitHub pages, and creates a GitHub release with the tarball.
14
- * Check the release looks good on both GitHub and launchpad.net.
15
-
16
- ## PPA
17
-
18
- In order to upload a PPA, you have to create a launchpad.net account and
19
- register a GPG key with that account. You also need to be added to the MaxMind
20
- team. Ask in the dev channel for someone to add you. See
21
- https://help.launchpad.net/Packaging/PPA for more details.
22
-
23
- The PPA release script is at `dev-bin/ppa-release.sh`. Running it should
24
- guide you though the release, although it may require some changes to run on
25
- configurations different than Greg's machine.
26
-
27
- Check whether any new Ubuntu versions need to be listed in this script
28
- before running it.
29
-
30
- You should run it from `master`.
31
-
32
- ## Homebrew
33
-
34
- * Go to https://github.com/Homebrew/homebrew-core/edit/master/Formula/libmaxminddb.rb
35
- * Edit the file to update the url and sha256. You can get the sha256 for the
36
- tarball with the `sha256sum` command line utility.
37
- * Make a commit with the summary `libmaxminddb <VERSION>`
38
- * Submit a PR with the changes you just made.
39
-
40
- # Prerequisites for releasing
41
-
42
- * Required packages (Ubuntu Artful): vim git-core dput build-essential
43
- autoconf automake libtool git-buildpackage libfile-slurp-perl pandoc
44
- dirmngr libfile-slurp-tiny-perl libdatetime-perl debhelper dh-autoreconf
45
- libipc-run3-perl libtest-output-perl devscripts
46
- * Install [hub](https://github.com/github/hub/releases). (Using `./install`
47
- from the tarball is fine)
48
- * GitHub ssh key (e.g. in `~/.ssh/id_rsa`)
49
- * Git config (e.g. `~/.gitconfig`)
50
- * Import your GPG secret key (or create one if you don't have a suitable
51
- one)
52
- * `gpg --import /path/to/key`
53
- * `gpg --edit-key KEYID` and trust it ultimately
54
- * Ensure it shows with `gpg --list-secret-keys`
55
- * You need to be invited to the launchpad.net MaxMind organization on your
56
- launchpad.net account.
57
- * You need your GPG key listed on your launchpad.net account
58
- * You can add it in the web interface. It wants the output of
59
- `gpg --fingerprint`.
60
- * Part of the instructions involve having your key published on the
61
- Ubuntu keyserver:
62
- `gpg --keyserver keyserver.ubuntu.com --send-keys KEYID`
63
- * You'll get an email with an encrypted payload that you need to decrypt
64
- and follow the link to confirm it.
65
- * Ensure `dch` knows your name and email. Refer to its man page for how to
66
- tell it this. One way is to set the `DEBFULLNAME` and `DEBEMAIL`
67
- environment variables. These should match your GPG key's name and email
68
- exactly. This is what gets used in the Debian changelog as well as
69
- defines what GPG key to use.