Skip to content

Sanitize strings to prevent UTF errors - #2357

Merged
Mab879 merged 3 commits into
OpenSCAP:mainfrom
jan-cerny:utf8_error
Jun 2, 2026
Merged

Sanitize strings to prevent UTF errors#2357
Mab879 merged 3 commits into
OpenSCAP:mainfrom
jan-cerny:utf8_error

Add allocation guards

7b79095
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Jun 2, 2026 in 1m 41s

Annotations

Check failure on line 98 in src/common/oscap_utf8.c

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AZ6HyHdQlvDuoOkD8wuz&open=AZ6HyHdQlvDuoOkD8wuz&pullRequest=2357

Check failure on line 70 in src/common/oscap_utf8.c

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 33 to the 25 allowed.

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AZ6HyHdQlvDuoOkD8wuy&open=AZ6HyHdQlvDuoOkD8wuy&pullRequest=2357

Check failure on line 122 in src/common/oscap_utf8.c

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AZ4nDmfMJ3_HwpX-0CyA&open=AZ4nDmfMJ3_HwpX-0CyA&pullRequest=2357

Check failure on line 116 in src/common/oscap_utf8.c

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AZ6HyHdQlvDuoOkD8wu0&open=AZ6HyHdQlvDuoOkD8wu0&pullRequest=2357

Check failure on line 104 in src/common/oscap_utf8.c

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AZ4nDmfMJ3_HwpX-0Cx_&open=AZ4nDmfMJ3_HwpX-0Cx_&pullRequest=2357

Check failure on line 33 in src/common/oscap_utf8.c

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 28 to the 25 allowed.

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AZ4nDmfMJ3_HwpX-0Cx-&open=AZ4nDmfMJ3_HwpX-0Cx-&pullRequest=2357