diff options
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/zenhttp/httpclient.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e15a2916..a0ade5cc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## - Bugfix: Don't require `--namespace` option when using `zen list-namespaces` command +- Bugfix: Crash in upload of blobs to Cloud DDC due to buffer range error ## 5.6.11 - Bugfix: Reinstate `zen builds --url` option to old behaviour, use `zen builds --cloud-url` for "Cloud Artifact URL" diff --git a/src/zenhttp/httpclient.cpp b/src/zenhttp/httpclient.cpp index f2b26b922..a2d323b5e 100644 --- a/src/zenhttp/httpclient.cpp +++ b/src/zenhttp/httpclient.cpp @@ -333,7 +333,7 @@ namespace detail { m_Buffer = (uint8_t*)Memory::Alloc(gsl::narrow<size_t>(m_BufferSize)); } m_BufferStart = Begin; - m_BufferEnd = Min(Begin + m_BufferSize, m_FileSize); + m_BufferEnd = Min(Begin + m_BufferSize, m_FileEnd); Read(m_Buffer, m_BufferEnd - m_BufferStart, m_BufferStart); uint64_t Count = Min(m_BufferEnd, End) - m_BufferStart; memcpy(WritePtr + Begin - m_FileOffset, m_Buffer, Count); |