From 1bd6e8aff74c8e3025299bce02a16d82160b1623 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 21 Sep 2020 20:32:09 +0100
Subject: [PATCH] flatpak-bwrap: Update from Flatpak 1.8.2

gcc 10 correctly diagnoses that if there are 0 bytes of arguments, we'll
allocate no bytes, leaving no space for this (unnecessary) '\0'.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 pressure-vessel/flatpak-bwrap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pressure-vessel/flatpak-bwrap.c b/pressure-vessel/flatpak-bwrap.c
index cdfc7ff2c..2eaf9ca45 100644
--- a/pressure-vessel/flatpak-bwrap.c
+++ b/pressure-vessel/flatpak-bwrap.c
@@ -1,6 +1,6 @@
 /*
  * Taken from Flatpak
- * Last updated: Flatpak 1.6.1
+ * Last updated: Flatpak 1.8.2
  *
  * Copyright © 2014-2018 Red Hat, Inc
  *
@@ -298,7 +298,6 @@ flatpak_bwrap_bundle_args (FlatpakBwrap *bwrap,
     data_len +=  strlen (bwrap->argv->pdata[i]) + 1;
 
   data = g_new (gchar, data_len);
-  *data = 0;
   ptr = data;
   for (i = start; i < end; i++)
     ptr = g_stpcpy (ptr, bwrap->argv->pdata[i]) + 1;
-- 
GitLab