Umbra Wiki weakness weakness/CWE-1046
Back to wiki

CWE-1046 — Creation of Immutable Text Using String Concatenation

provenance: imported · CWE: CWE-1046

CWE-1046: Creation of Immutable Text Using String Concatenation

MITRE CWE weakness

Kind Weakness
Abstraction Base
Status Incomplete
Likelihood of exploit —

Description

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.

Common consequences

  • Other: Reduce Performance

Mitigations

(none listed)

References

  • CWE page: https://cwe.mitre.org/data/definitions/1046.html
  • CWE list: https://cwe.mitre.org/data/index.html

See all 1,245 pages under Weakness classes (CWE) →

Related pages