Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 53715963be13
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c88e09d46f31
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 24, 2018

  1. arrow-cpp: fix for zstd 1.3.6+ (#48928)

    veprbl authored and xeji committed Oct 24, 2018
    Copy the full SHA
    c88e09d View commit details
Showing with 20 additions and 0 deletions.
  1. +3 −0 pkgs/development/libraries/arrow-cpp/default.nix
  2. +17 −0 pkgs/development/libraries/arrow-cpp/zstd136.patch
3 changes: 3 additions & 0 deletions pkgs/development/libraries/arrow-cpp/default.nix
Original file line number Diff line number Diff line change
@@ -26,6 +26,9 @@ stdenv.mkDerivation rec {

# patch to fix python-test
./darwin.patch

# facebook/zstd#1385
./zstd136.patch
];

nativeBuildInputs = [ cmake ];
17 changes: 17 additions & 0 deletions pkgs/development/libraries/arrow-cpp/zstd136.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- a/src/arrow/util/compression_zstd.cc
+++ b/src/arrow/util/compression_zstd.cc
@@ -35,8 +35,13 @@ namespace util {

Status ZSTDCodec::Decompress(int64_t input_len, const uint8_t* input, int64_t output_len,
uint8_t* output_buffer) {
+ void *safe_output_buffer = static_cast<void*>(output_buffer);
+ int dummy {};
+ if ((output_len == 0) && (output_buffer == NULL)) {
+ safe_output_buffer = static_cast<void*>(&dummy);
+ }
int64_t decompressed_size =
- ZSTD_decompress(output_buffer, static_cast<size_t>(output_len), input,
+ ZSTD_decompress(safe_output_buffer, static_cast<size_t>(output_len), input,
static_cast<size_t>(input_len));
if (decompressed_size != output_len) {
return Status::IOError("Corrupt ZSTD compressed data.");