Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
libdlm
bug-1191734_0013-dlm_controld-fix-string-copies...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-1191734_0013-dlm_controld-fix-string-copies.patch of Package libdlm
From a877e55c4661cfceabcb566ad49afd27b245cb65 Mon Sep 17 00:00:00 2001 From: David Teigland <teigland@redhat.com> Date: Fri, 15 Oct 2021 12:02:34 -0500 Subject: [PATCH 13/14] dlm_controld fix string copies --- dlm_controld/config.c | 4 +--- dlm_controld/main.c | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dlm_controld/config.c b/dlm_controld/config.c index a7ebb120a6b8..b15527b949b1 100644 --- a/dlm_controld/config.c +++ b/dlm_controld/config.c @@ -495,9 +495,7 @@ void set_opt_online(char *cmd_str, int cmd_len) return; } - i = -1; - while (++i < av_count) { - + for (i = 0; i < av_count; i++) { ind = get_ind_name(av[i]); if (ind < 0) continue; diff --git a/dlm_controld/main.c b/dlm_controld/main.c index 3a081c802056..57844dc10129 100644 --- a/dlm_controld/main.c +++ b/dlm_controld/main.c @@ -927,11 +927,11 @@ static void copy_options(char *buf, int *len) memset(tmp, 0, sizeof(tmp)); if (o->req_arg == req_arg_str) - l = snprintf(tmp, 250, "%s=%s", o->name, o->use_str); + l = snprintf(tmp, 240, "%s=%s", o->name, o->use_str); else if (o->req_arg == req_arg_uint) - l = snprintf(tmp, 250, "%s=%u", o->name, o->use_uint); + l = snprintf(tmp, 240, "%s=%u", o->name, o->use_uint); else - l = snprintf(tmp, 250, "%s=%d", o->name, o->use_int); + l = snprintf(tmp, 240, "%s=%d", o->name, o->use_int); if (o->dynamic_set) snprintf(tmp + l, 15, " (set_config)\n"); -- 2.33.0
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