changeset 29623:a49e8c0ce9a3

maint: merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 06 May 2021 11:55:51 +0200
parents a5ee1fec49ba (current diff) 07dc3ad56d74 (diff)
children 539ba2b7d90c
files
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/wrappers/unistd-wrappers.c	Wed May 05 20:37:55 2021 -0400
+++ b/liboctave/wrappers/unistd-wrappers.c	Thu May 06 11:55:51 2021 +0200
@@ -166,7 +166,7 @@
     ;
 
   /* Allocate new argument vector.  */
-  new_argv = (char **) malloc (argc + 1);
+  new_argv = (char **) malloc ((argc + 1) * sizeof (char *));
 
   /* Put quoted arguments into the new argument vector.  */
   for (i = 0; i < argc; i++)