Skip to content

Enhancement: make string::concat handle lengths > 1024 safely #4

@io-eric

Description

@io-eric

What: string::concat uses a stack-based Formatter<1024> which can overflow or truncate for very large concatenations.

Where: include/webcc/core/string.h and include/webcc/core/format.h

Proposed fix:

  • Detect buffer overflow and fallback to a dynamic buffer or incremental allocation.
  • Add tests for very large concatenations to validate correctness.

Acceptance criteria:

  • Large concatenations do not truncate and pass tests.
  • Behavior is documented in the header or docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttestsAdd or fix tests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions