diff --git a/CHANGELOG.md b/CHANGELOG.md index b5aa083..bb6813a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.39.1 - 2025-07-22 + +### Bug fixes +- Fixed potential corrupted data in `DbnFileStore::Replay` + ## 0.39.0 - 2025-07-15 ### Breaking changes diff --git a/CMakeLists.txt b/CMakeLists.txt index c4c9add..5162a4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24..4.0) project( databento - VERSION 0.39.0 + VERSION 0.39.1 LANGUAGES CXX DESCRIPTION "Official Databento client library" ) diff --git a/pkg/PKGBUILD b/pkg/PKGBUILD index 1e20b37..ea2f96a 100644 --- a/pkg/PKGBUILD +++ b/pkg/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Databento _pkgname=databento-cpp pkgname=databento-cpp-git -pkgver=0.39.0 +pkgver=0.39.1 pkgrel=1 pkgdesc="Official C++ client for Databento" arch=('any') diff --git a/src/dbn_decoder.cpp b/src/dbn_decoder.cpp index a97efba..2649f48 100644 --- a/src/dbn_decoder.cpp +++ b/src/dbn_decoder.cpp @@ -311,7 +311,7 @@ const databento::Record* DbnDecoder::DecodeRecord() { } } current_record_ = Record{BufferRecordHeader()}; - buffer_.Consume(current_record_.Size()); + buffer_.ConsumeNoShift(current_record_.Size()); current_record_ = DbnDecoder::DecodeRecordCompat( version_, upgrade_policy_, ts_out_, &compat_buffer_, current_record_); return ¤t_record_; diff --git a/src/live_blocking.cpp b/src/live_blocking.cpp index 077fa3d..9611d04 100644 --- a/src/live_blocking.cpp +++ b/src/live_blocking.cpp @@ -190,11 +190,10 @@ const databento::Record* LiveBlocking::NextRecord( } current_record_ = Record{BufferRecordHeader()}; const auto bytes_to_consume = current_record_.Size(); + buffer_.ConsumeNoShift(bytes_to_consume); current_record_ = DbnDecoder::DecodeRecordCompat(version_, upgrade_policy_, send_ts_out_, &compat_buffer_, current_record_); - // Can't consume til after upgrade as Consume may shift - buffer_.Consume(bytes_to_consume); return ¤t_record_; }