Skip to content

Commit

Permalink
Merge pull request #14 from praetorian-inc/fix-oracle-plugin-crash
Browse files Browse the repository at this point in the history
Added Length Check to Before Accessing Array
  • Loading branch information
praetorian-thendrickson authored Feb 27, 2023
2 parents db83d6c + 63f2e7c commit 21ab57e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/plugins/services/oracledb/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ func isOracleDBRunning(response []byte) bool {
0x50, 0x3d, 0x29, 0x28, 0x56, 0x53, 0x4e, 0x4e,
0x55, 0x4d, 0x3d,
}

if len(response) < 27 {
return false
}

responseCode := int(response[4])

// This should always be a response code of 4 (rejection),
Expand Down

0 comments on commit 21ab57e

Please sign in to comment.