Skip to content

Commit

Permalink
Fix for the coverityscan NULL Dereferance warning
Browse files Browse the repository at this point in the history
  • Loading branch information
spidermanja committed Dec 13, 2022
1 parent 44aaf56 commit 3e50537
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/js/RelpConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
let len = _PARSER.getLength();
let pdata = _PARSER.getData();

if(len == 0 && (pdata.byteLength == 0 || pdata == undefined)){
if(len == 0 && (pdata.byteLength == 0)){
console.log('PData Assigning.....')
pdata = 0

Expand Down
2 changes: 1 addition & 1 deletion src/main/js/RelpParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
console.log('relpParser> newLine: '+ String.fromCharCode(b)+' left '+ this._responseLengthLeft); //TODO: Check
}
}
else if(this._responseData.byteLength == 0 && this._responseLengthString == '0' || this._responseData == undefined){ // 🤔 acceptable???
else if(this._responseData.byteLength == 0 && this._responseLengthString == '0'){ // adjust
this._isComplete = true
if(process.env.NODE_ENV == 'RELP_DEBUG'){
console.log('relpParser> newLine: '+ String.fromCharCode(b)+' left '+ this._responseLengthString); //TODO: Check
Expand Down

0 comments on commit 3e50537

Please sign in to comment.