Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
slurm.32296
U_08-Use-safe_unpack32.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_08-Use-safe_unpack32.patch of Package slurm.32296
From: Tim Wickberg <tim@schedmd.com> Date: Tue Nov 28 23:07:38 2023 -0700 Subject: [PATCH 8/28]Use safe_unpack32(). Patch-mainline: Upstream Git-repo: https://github.com/SchedMD/slurm Git-commit: 39340cb08202c8cd6252da6c70dc619d950fbc2a References: bsc#1218046, bsc#1218050, bsc#1218051, bsc#1218053 Signed-off-by: Egbert Eich <eich@suse.de> --- src/common/pack.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/common/pack.c b/src/common/pack.c index 843fee9d85..cd924df86c 100644 --- a/src/common/pack.c +++ b/src/common/pack.c @@ -1076,15 +1076,9 @@ void packstr_array(char **valp, uint32_t size_val, Buf buffer) int unpackstr_array(char ***valp, uint32_t * size_valp, Buf buffer) { int i; - uint32_t ns; uint32_t uint32_tmp; - if (remaining_buf(buffer) < sizeof(ns)) - return SLURM_ERROR; - - memcpy(&ns, &buffer->head[buffer->processed], sizeof(ns)); - *size_valp = ntohl(ns); - buffer->processed += sizeof(ns); + safe_unpack32(size_valp, buffer); if (*size_valp > MAX_ARRAY_LEN_MEDIUM) { error("%s: Buffer to be unpacked is too large (%u > %u)", @@ -1106,6 +1100,9 @@ int unpackstr_array(char ***valp, uint32_t * size_valp, Buf buffer) } else *valp = NULL; return SLURM_SUCCESS; + +unpack_error: + 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