diff options
| author | Dan Engelbrecht <[email protected]> | 2025-09-30 20:13:38 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-09-30 20:13:38 +0200 |
| commit | d44b5de88932687376fbfccc0835d774dc958a6b (patch) | |
| tree | bf5cb716c6b158b05ad6a980075c54b10ff4befb | |
| parent | HttpClient support for pluggable back-ends (#532) (diff) | |
| download | zen-d44b5de88932687376fbfccc0835d774dc958a6b.tar.xz zen-d44b5de88932687376fbfccc0835d774dc958a6b.zip | |
fix bounds check when finalizing build state (#533)
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/zen/cmds/builds_cmd.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 306702160..a5a3b03b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## - Bugfix: Parsing of `zen builds` `--log-progress` option fixed +- Bugfix: Rebuild State phase of `zen builds download` could read out of bound for target path array ## 5.7.3 - Feature: `zen builds download` and `zen builds ls` now allows multiple wildcards for `--wildcard` and `--exclude-wildcard` separated by semicolons (;) diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp index 437b061c8..508fbe8b4 100644 --- a/src/zen/cmds/builds_cmd.cpp +++ b/src/zen/cmds/builds_cmd.cpp @@ -8502,7 +8502,8 @@ namespace { } size_t TargetCount = 1; - while (Targets[TargetOffset + TargetCount].RawHash == Targets[TargetOffset].RawHash) + while ((TargetOffset + TargetCount) < Targets.size() && + (Targets[TargetOffset + TargetCount].RawHash == Targets[TargetOffset].RawHash)) { TargetCount++; } |