diff options
| author | Dan Engelbrecht <[email protected]> | 2025-02-26 21:27:13 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-02-26 21:27:13 +0100 |
| commit | aef396302e8f9177aa9185bd37d5a8657056f73c (patch) | |
| tree | 2f7997a454eedea93779876e10002aed7371ce23 | |
| parent | clang-format fix (diff) | |
| download | zen-aef396302e8f9177aa9185bd37d5a8657056f73c.tar.xz zen-aef396302e8f9177aa9185bd37d5a8657056f73c.zip | |
Fix bug causing crash if large file was exact multiple of 256KB when using zen builds command (#286)
| -rw-r--r-- | CHANGELOG.md | 4 | ||||
| -rw-r--r-- | src/zen/cmds/builds_cmd.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f0465ffcd..e66858db0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ ## +- Bugfix: Fix bug causing crash if large file was exact multiple of 256KB when using zen builds command + +## 5.5.19 - Feature: **EXPERIMENTAL** New `zen builds` command to list, upload and download folders to Cloud Build API - `builds list` list available builds (**INCOMPLETE - FILTERING MISSING**) - `builds upload` upload a folder to Cloud Build API @@ -60,6 +63,7 @@ - `--plain-progress` use plain line-by-line progress output - `--verbose` +## 5.5.18 - Bugfix: Fix parsing of workspace options in Lua config - Bugfix: Add missing Lua option for option `--gc-projectstore-duration-seconds` - Bugfix: Add missing Lua mapping option to `--statsd` command line option diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp index ececab29e..ed1eb2d19 100644 --- a/src/zen/cmds/builds_cmd.cpp +++ b/src/zen/cmds/builds_cmd.cpp @@ -855,7 +855,7 @@ namespace { ZEN_ASSERT((Offset + Size) <= SourceSize); const uint64_t BlockIndexStart = Offset / BlockSize; - const uint64_t BlockIndexEnd = (Offset + Size) / BlockSize; + const uint64_t BlockIndexEnd = (Offset + Size - 1) / BlockSize; std::vector<SharedBuffer> BufferRanges; BufferRanges.reserve(BlockIndexEnd - BlockIndexStart + 1); |