Katalog CWE

CWE-1046 · Słabość

Creation of Immutable Text Using String Concatenation

Abstrakcja
Bazowa
Status
Niekompletny
Dodano
2 lipca 2018
Ostatnia zmiana
11 grudnia 2025

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

The product creates an immutable text string using string concatenation operations.

When building a string via a looping feature (e.g., a FOR or WHILE loop), the use of += to append to the existing string will result in the creation of a new object with each iteration, which can be inefficient in comparison with use of text buffer data elements.

Skutki

  • Other

    Reduce Performance

    This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this could be influenced to create performance problem.

Słabość nadrzędna

Kiedy powstaje

Dotyczy

Not Language-Specific

Źródła

  1. Automated Source Code Performance Efficiency Measure (ASCPEM) — Object Management Group (OMG), ASCPEM-PRF-2, 2016

Wpis z katalogu CWE 4.20.