Closed protamail closed 3 weeks ago
protection added for the code
if len(pck.buffer) > 1 {
var err error
if sessionCtx.AdvancedService.CryptAlgo != nil || sessionCtx.AdvancedService.HashAlgo != nil {
pck.buffer = pck.buffer[:len(pck.buffer)-1]
}
if sessionCtx.AdvancedService.CryptAlgo != nil {
pck.buffer, err = sessionCtx.AdvancedService.CryptAlgo.Decrypt(pck.buffer)
if err != nil {
return nil, err
}
tracer.LogPacket("Read packet (Decrypted): ", pck.buffer)
}
if sessionCtx.AdvancedService.HashAlgo != nil {
pck.buffer, err = sessionCtx.AdvancedService.HashAlgo.Validate(pck.buffer)
if err != nil {
return nil, err
}
}
}
you can test it at last commit
When periodically ping'ing oracle connection, I often get the out-of-range error, originating from
sijms/go-ora/v2/network/data_packet.go
line 88: