Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
slurm.32296
U_09-Use-safe_xcalloc.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_09-Use-safe_xcalloc.patch of Package slurm.32296
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: cb51b8b895c5c627a6ad7325bedec15a73520644 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 cd924df86c..bbe8d74ca1 100644 --- a/src/common/pack.c +++ b/src/common/pack.c @@ -1086,7 +1086,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; @@ -1102,6 +1102,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