jbruinaud / BodgeitCxFlowGithub

0 stars 0 forks source link

CX Unsynchronized_Access_To_Shared_Data @ src/com/thebodgeitstore/search/AdvancedSearch.java [master] #27

Open jbruinaud opened 2 years ago

jbruinaud commented 2 years ago

Unsynchronized_Access_To_Shared_Data issue exists @ src/com/thebodgeitstore/search/AdvancedSearch.java in branch master

The concurrent process getResultsOutput found in the file src\com\thebodgeitstore\search\AdvancedSearch.java at line 93 influences the shared resource jsonEmpty in the file src\com\thebodgeitstore\search\AdvancedSearch.java at line 93. When performed concurrently, an unexpected race condition may occur.

Severity: Low

CWE:567

Checkmarx

Training Recommended Fix

Lines: 201 202 188 93 95


Code (Line #201):

            this.output = (this.isAjax()) ? this.output.substring(0, this.output.length() - 2).concat(this.jsonPostqual) 

Code (Line #202):

                                          : this.output.concat(this.htmlPostqual);

Code (Line #188):

            this.output = (this.isAjax()) ? this.jsonPrequal : this.htmlPrequal;

Code (Line #93):

            return this.jsonEmpty;

Code (Line #95):

            return this.htmlEmpty;