Files
rippled/include/xrpl
Pratik Mankawde 5e266e0e04 fix(telemetry): Do not build a string_view from a null attribute pointer
The C-string overload of setAttribute handed its pointer straight to
std::string_view, whose pointer constructor reads the pointer to find the
length. A null one is undefined behaviour.

A null pointer carries no text, and an empty value already means something on
this class, so nothing is recorded rather than an empty string.

The overload itself has to stay. Without it a string literal would bind to the
bool overload, because pointer-to-bool is a standard conversion and beats the
string_view one, so every string attribute would silently record true. The
header now records that.
2026-09-22 20:29:39 +01:00
..