From d261ca953ad07e24dc2c96366ebbeb28ee734b05 Mon Sep 17 00:00:00 2001 From: Richard Acayan Date: Tue, 10 Jan 2023 20:53:42 -0500 Subject: [PATCH] fastrpc: listener: free correct amount of input buffers The amount of input buffers might be different from the amount of output buffers. Free the correct amount of input buffers so there is no out-of-bounds memory access. --- fastrpc/listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastrpc/listener.c b/fastrpc/listener.c index 2d02d3c..ff15a27 100644 --- a/fastrpc/listener.c +++ b/fastrpc/listener.c @@ -256,7 +256,7 @@ int run_fastrpc_listener(int fd) break; if (decoded != NULL) - iobuf_free(REMOTE_SCALARS_OUTBUFS(sc), decoded); + iobuf_free(REMOTE_SCALARS_INBUFS(sc), decoded); } return ret;