Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
slurm.32299
U_09-Use-safe_xcalloc.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_09-Use-safe_xcalloc.patch of Package slurm.32299
From: Tim Wickberg <tim@schedmd.com> Date: Tue Nov 28 23:15:28 2023 -0700 Subject: [PATCH 9/28]Use safe_xcalloc(). Patch-mainline: Upstream Git-repo: https://github.com/SchedMD/slurm Git-commit: ab3b5ad19340fa421c96ac6317373c65232d0821 References: bsc#1218046, bsc#1218050, bsc#1218051, bsc#1218053 Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Egbert Eich <eich@suse.com> --- src/common/pack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/pack.c b/src/common/pack.c index 3756e9fcef..1074086092 100644 --- a/src/common/pack.c +++ b/src/common/pack.c @@ -1111,7 +1111,7 @@ int unpackstr_array(char ***valp, uint32_t * size_valp, Buf buffer) return SLURM_ERROR; } else if (*size_valp > 0) { - *valp = xmalloc_nz(sizeof(char *) * (*size_valp + 1)); + safe_xcalloc(*valp, *size_valp + 1, sizeof(char *)); for (i = 0; i < *size_valp; i++) { if (unpackstr_xmalloc(&(*valp)[i], &uint32_tmp, buffer)) { *size_valp = 0; @@ -1127,6 +1127,7 @@ int unpackstr_array(char ***valp, uint32_t * size_valp, Buf buffer) return SLURM_SUCCESS; unpack_error: + *size_valp = 0; return SLURM_ERROR; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor