Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,36 @@ Versioning](https://semver.org/).
> had little or no release-note detail, the entry is intentionally terse
> rather than inferring unsupported intent.

## [0.10.1] - 2026-08-20

### Fixed

- Hardened `BinaryArchive::Load()` against malformed and adversarial ESPB v2
payloads by bounding nesting depth, total decoded nodes, object members,
array elements, property-name lengths, and string lengths.
- Added overflow-safe remaining-buffer checks before copying decoded names and
string values.
- Converted allocation/decoder exceptions during BinaryArchive loading into a
clean invalid-archive result rather than allowing diagnostic or transport
callers to be destabilized.

### Added

- Added `BinaryArchiveDecodeLimits` and explicit `Load(..., limits)` overloads
for applications that need tighter or broader decode policies.
- Added `BinaryArchiveVisitor`, `TraverseBinaryArchive()`, and
`ValidateBinaryArchive()` for bounded, allocation-free ESPB v2 inspection
without constructing an intermediate `SerializationNode` tree.
- Added regression and stress-oriented malformed-input coverage for deep,
broad, oversized-name, oversized-string, aggregate-node, and arbitrary-byte
payloads, including the allocation-free traversal path.

### Compatibility

- The existing `Load()` overloads remain source-compatible and use safe
defaults.
- The ESPB v2 wire format is unchanged.

## [0.10.0] - 2026-08-20

### Added
Expand Down Expand Up @@ -85,4 +115,4 @@ milestones before the first published GitHub Release at 0.9.0.
> release. Earlier 0.x version numbers appeared during repository
> development, but are grouped here rather than assigning release dates
> or exact contents that are not fully supported by the published
> release record.
> release record.
64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,66 @@ Development Platform.

## Latest Stable Version

**0.10.0**
**0.10.1**

### 0.10.1 bounded BinaryArchive decoding

Version 0.10.1 hardens `BinaryArchive` when decoding untrusted or malformed
ESPB v2 payloads. The default `Load()` overload now applies embedded-friendly
limits for nesting depth, aggregate node count, object members, array elements,
property-name length, and string length. Allocation or decoder exceptions are
converted into a clean invalid-archive result rather than escaping into the
application.

Applications with different requirements can supply explicit limits:

```cpp
ESPressio::Serializable::BinaryArchive archive;
ESPressio::Serializable::BinaryArchiveDecodeLimits limits;

limits.MaximumDepth = 16;
limits.MaximumTotalNodes = 1024;
limits.MaximumObjectMembers = 256;
limits.MaximumArrayElements = 1024;
limits.MaximumNameLength = 256;
limits.MaximumStringLength = 16 * 1024;

if (!archive.Load(data, size, limits)) {
// Malformed, truncated, unsupported, or outside the configured limits.
}
```

The no-options overload remains source-compatible and uses the library defaults.
The ESPB v2 wire format is unchanged.

### Allocation-free BinaryArchive validation and traversal

For diagnostics, protocol inspection, and other cases that do not require an
owned `SerializationNode` tree, 0.10.1 also adds an allocation-free ESPB v2
traversal API:

```cpp
ESPressio::Serializable::BinaryArchiveDecodeLimits limits;
limits.MaximumDepth = 12;
limits.MaximumTotalNodes = 1024;

if (ESPressio::Serializable::ValidateBinaryArchive(
data,
size,
limits
)) {
// Structurally valid and within the configured limits.
}
```

`TraverseBinaryArchive()` accepts a `BinaryArchiveVisitor` and streams object,
array, property, and scalar callbacks directly from the encoded bytes. The
traversal uses `std::string_view` for borrowed names/string values and does not
construct a second tree or copy payload strings merely to inspect them.

This is particularly useful on ESP32 for diagnostic paths where attempting to
build another heap-backed tree during low-memory conditions would itself be
undesirable.

### 0.10.0 direct Binary fast path

Expand Down Expand Up @@ -162,6 +221,7 @@ Ordinary usage of those libraries remains serialization-free.
- Representation-neutral metadata.
- Embedded-friendly archives.
- Direct CBOR/Binary support.
- Bounded and allocation-free BinaryArchive inspection where appropriate.
- Validation and schema evolution.
- Compile-time diagnostics where possible.
- Optional rather than ecosystem-wide dependency.
- Optional rather than ecosystem-wide dependency.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESPressio-Serializable",
"version": "0.10.0",
"version": "0.10.1",
"description": "Compile-time declarative serialization components for the Flowduino ESPressio Development Platform.",
"keywords": [
"serialization",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESPressio Serializable
version=0.10.0
version=0.10.1
author=Flowduino
maintainer=Flowduino
sentence=Compile-time declarative serialization components for the ESPressio Development Platform.
Expand Down
Loading
Loading