Projects
Eulaceura:Factory
iSulad
_service:obs_scm:0084-trim-key-value-for-env.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0084-trim-key-value-for-env.patch of Package iSulad
From de9ed770a254c8f67ac228f56fe461e1c834609c Mon Sep 17 00:00:00 2001 From: jikai <jikai11@huawei.com> Date: Sat, 11 May 2024 07:51:35 +0000 Subject: [PATCH 84/85] trim key/value for env Signed-off-by: jikai <jikai11@huawei.com> --- src/daemon/modules/spec/specs_extend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/daemon/modules/spec/specs_extend.c b/src/daemon/modules/spec/specs_extend.c index f4208405..926aaf3c 100644 --- a/src/daemon/modules/spec/specs_extend.c +++ b/src/daemon/modules/spec/specs_extend.c @@ -205,6 +205,8 @@ static int generate_env_map_from_file(FILE *fp, json_map_string_string *env_map) // ignore invalid env continue; } + key = util_trim_space(key); + value = util_trim_space(value); if ((size_t)(MAX_BUFFER_SIZE - 1) - strlen(key) < strlen(value)) { ERROR("env length exceed %d bytes", MAX_BUFFER_SIZE); return -1; -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2