diff options
| author | Dan Engelbrecht <[email protected]> | 2025-06-10 14:48:56 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-06-10 14:48:56 +0200 |
| commit | 1442dae38a54b553d2285176f4969520332a9843 (patch) | |
| tree | d385b8f5ad405e881ac1cf22f5f6448e41f89933 /src/zenhttp/httpclient.cpp | |
| parent | revert 61b4a88f and cadaad63 (diff) | |
| download | zen-1442dae38a54b553d2285176f4969520332a9843.tar.xz zen-1442dae38a54b553d2285176f4969520332a9843.zip | |
crash in composite buffer stream (#431)
* fix BufferedReadFileStream calculating buffer end wrong
Diffstat (limited to 'src/zenhttp/httpclient.cpp')
| -rw-r--r-- | src/zenhttp/httpclient.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |