Skip to content

Commit

Permalink
fix: add length check in pg parser (#1804)
Browse files Browse the repository at this point in the history
Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
  • Loading branch information
gouravkrosx committed Apr 10, 2024
1 parent e0f3d18 commit 6bf1d23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/core/proxy/integrations/postgres/v1/util.go
Expand Up @@ -483,6 +483,9 @@ func mergePgRequests(requestBuffers [][]byte, logger *zap.Logger) [][]byte {

func mergeMocks(pgmocks []models.Backend, logger *zap.Logger) []models.Backend {
logger.Debug("MERGING Mocks")
if len(pgmocks) == 0 {
return pgmocks
}
// Check for PBDE first
if len(pgmocks[0].PacketTypes) == 0 || pgmocks[0].PacketTypes[0] != "P" {
return pgmocks
Expand Down

0 comments on commit 6bf1d23

Please sign in to comment.