about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/command/commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index e6082bd8..ef2de3b1 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -802,7 +802,7 @@ static void
 writecsv(int fd, const char *const str){
     if(!str) return;
     size_t len = strlen(str);
-    char *s = malloc((2 * len + 1) * sizeof(char));
+    char *s = malloc(2 * len * sizeof(char));
     char *c = s;
     for(int i = 0; i < strlen(str); i++){
         if(str[i] != '"') *c++ = str[i];