File U_28-Now-using-xmalloc-so-string-is-already-NUL-terminated.patch of Package slurm.32313

From: Tim Wickberg <tim@schedmd.com>
Date: Wed Nov 29 15:55:12 2023 -0700
Subject: [PATCH 28/28]Now using xmalloc(), so string is already NUL-terminated.
Patch-mainline: Upstream
Git-repo: https://github.com/SchedMD/slurm
Git-commit: f44c25aeaf0a19fed14e43f2c727d7879cf595c2
References: bsc#1218046, bsc#1218050, bsc#1218051, bsc#1218053
Signed-off-by: Egbert Eich <eich@suse.de>

---
 src/common/pack.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/common/pack.c b/src/common/pack.c
index 3e29262f83..ee1e26e29f 100644
--- a/src/common/pack.c
+++ b/src/common/pack.c
@@ -1012,9 +1012,6 @@ int unpackstr_xmalloc_escaped(char **valp, uint32_t *size_valp, Buf buffer)
 		*copy++ = tmp;
 	}
 
-	/* Since we used xmalloc_nz, terminate the string. */
-	*copy++ = '\0';
-
 	/* add the original value since that is what we processed */
 	buffer->processed += cnt;
 
openSUSE Build Service is sponsored by