Fix string size taking into account the '\0'-character

Merged Andrea Gianarda requested to merge fix/gcc_15_1_1 into release/5.4

Merge request reports