From cf7e5c470b358233c72f239fc047776c4842217e Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Thu, 12 Aug 2021 20:34:15 -0700 Subject: [PATCH] Fix malloc error --- system/src/riju-system-privileged.c | 1 + 1 file changed, 1 insertion(+) diff --git a/system/src/riju-system-privileged.c b/system/src/riju-system-privileged.c index ef59132..64588d4 100644 --- a/system/src/riju-system-privileged.c +++ b/system/src/riju-system-privileged.c @@ -65,6 +65,7 @@ char *quoteArgs(int argc, char **cmdline) len_total += len_read; if (len_allocated - len_total < 1024) { char *new_buf = malloc(len_allocated + 1024); + len_allocated += 1024; if (new_buf == NULL) die("malloc failed"); memcpy(new_buf, buf, len_total);