From 50c984427af4399d9d70224f79141cc900fad7f0 Mon Sep 17 00:00:00 2001 From: Thomas Hendrickson Date: Mon, 27 Nov 2023 10:58:17 -0500 Subject: [PATCH] rpc bug fix --- pkg/plugins/services/linuxrpc/linuxrpc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/plugins/services/linuxrpc/linuxrpc.go b/pkg/plugins/services/linuxrpc/linuxrpc.go index 82f3c34..5131c6a 100644 --- a/pkg/plugins/services/linuxrpc/linuxrpc.go +++ b/pkg/plugins/services/linuxrpc/linuxrpc.go @@ -125,6 +125,9 @@ func parseRPCInfo(response []byte, lookupResponse *plugins.ServiceRPC) error { for valueFollows == 1 { tmp := plugins.RPCB{} + if len(response) < 0x20 { + return nil + } tmp.Program = int(binary.BigEndian.Uint32(response[0:4])) response = response[4:]