Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/geo/stbox_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,13 @@ void StboxFunctions::Stbox_from_hexwkb(DataChunk &args, ExpressionState &state,
UnaryExecutor::Execute<string_t, string_t>(
args.data[0], result, args.size(),
[&](string_t input_hexwkb) -> string_t {
char *hexwkb = (char*)input_hexwkb.GetData();
STBox *stbox = stbox_from_hexwkb(hexwkb);
// string_t::GetData() is not NUL-terminated, but stbox_from_hexwkb()
// strlen()s its argument; reading the raw pointer overruns the buffer
// on allocators that leave the trailing byte non-zero (macOS arm64),
// yielding a spurious "Invalid hex string, length (...)" (#170). Copy
// into a NUL-terminated std::string first, as the sibling consumers do.
std::string hexwkb = input_hexwkb.GetString();
STBox *stbox = stbox_from_hexwkb(hexwkb.c_str());
if (!stbox) {
throw InternalException("Failure in Stbox_from_hexwkb: unable to cast hexwkb to stbox");
return string_t();
Expand Down
4 changes: 2 additions & 2 deletions vcpkg_ports/meos/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO estebanzimanyi/MobilityDB
REF a8178dc9d56d841d0eb5025a7e8717c8d25a1d0f
SHA512 030a144bb3247695702dd2de11f4c389ed28c6eb0186e6988a489e2b00e9801179ba8f27bcbcd81ae89e398a7277ed7f9ff7058dbf15f5db322ae4644365c560
REF 3db47f887c61f049a6a03db55c48bedf6d10eee4
SHA512 b73123bca036813c43937f90f0d0ce45af5cb9e39d6a597304199d21ae854212319a3a7b58ecd075eb5678d89d6d5990b9faf63dd29bd8c9a4e2ed83282b94c5
)

vcpkg_replace_string(
Expand Down
Loading