File: 0004-Use-g_realloc-in-named_pipe_client_handler.patch

package info (click to toggle)
libsearpc 3.2.1-1%2Breally3.2%2Bgit20220902.15f6f0b-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 524 kB
  • sloc: ansic: 4,094; python: 863; makefile: 111; sh: 68
file content (21 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Moritz Schlarb <schlarbm@uni-mainz.de>
Date: Mon, 12 Nov 2018 10:34:17 +0100
Subject: Use g_realloc in named_pipe_client_handler

---
 lib/searpc-named-pipe-transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/searpc-named-pipe-transport.c b/lib/searpc-named-pipe-transport.c
index 88aa18e..a169a0e 100644
--- a/lib/searpc-named-pipe-transport.c
+++ b/lib/searpc-named-pipe-transport.c
@@ -236,7 +236,7 @@ static void* named_pipe_client_handler(void *arg)
 
         while (bufsize < len) {
             bufsize *= 2;
-            buf = realloc(buf, bufsize);
+            buf = g_realloc(buf, bufsize);
         }
 
         if (pipe_read_n(connfd, buf, len) < 0 || len == 0) {