Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The concatenation of wide and narrow string literals could lead to undefined behavior.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

STR10-C

Low

Probable

Medium

P4

L3

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
encoding-mismatchFully checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-STR10
ECLAIR
Include Page
ECLAIR_V
ECLAIR_V

CC2.STR10

Fully implemented.

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C0874
LDRA tool suite
Include Page
LDRA_V
LDRA_V
450 SFully implemented
Parasoft C/C++test
9.5MISRA2008-2_13_5Fully implementedPRQA QA-C Include PagePRQA QA-C_vPRQA QA-C_v874 
Include Page
Parasoft_V
Parasoft_V

CERT_C-STR10-a

Narrow and wide string literals shall not be concatenated
PC-lint Plus

Include Page
PC-lint Plus_V
PC-lint Plus_V

707

Fully supported

SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
NarrowAndWideStringConcat
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
encoding-mismatchFully checked

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

Related Guidelines

MISRA C++:2008Rule 2-13-5

Bibliography

[ISO/IEC 9899:2011]Section 6.4.5, "String Literals"

...


...

Image Modified Image Modified Image Modified