Skip to content

Commit

Permalink
Fix wrong-way comparison that was causing buffer overflow crash in ti…
Browse files Browse the repository at this point in the history
…le-join (#14)

* Fix wrong-way comparison that was causing buffer overflow in tile-join

* Update changelog
  • Loading branch information
e-n-f authored Sep 27, 2022
1 parent af1a7ed commit 3086838
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.6.3

* Fix crash in tile-join caused by wrong-way comparison

## 2.6.2

* Stop adding features to a tile if it can't possibly work, to limit memory use
Expand Down
2 changes: 1 addition & 1 deletion tile-join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void handle_strategies(const unsigned char *s, std::vector<strategy> *st) {
} else if (v->type != JSON_NUMBER) {
fprintf(stderr, "Value %zu of %zu is not a number: %s\n", j, i, s);
} else {
if (i <= st->size()) {
if (i >= st->size()) {
st->resize(i + 1);
}

Expand Down
2 changes: 1 addition & 1 deletion version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP

#define VERSION "v2.6.2"
#define VERSION "v2.6.3"

#endif

0 comments on commit 3086838

Please sign in to comment.