Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
mdadm.5365
0128-avoid-confusion-with-parameter-devname-wit...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0128-avoid-confusion-with-parameter-devname-with-same-nam.patch of Package mdadm.5365
From: Bas van Schaik <bas@traiectum.net> Date: Thu, 3 Dec 2015 13:28:32 +0000 Subject: [PATCH 183/359] avoid confusion with parameter 'devname' with same name, ensure buffer is large enough for two ints plus extras From fa9aca493007616cdc0529a2a4d13ff397a07558 Mon Sep 17 00:00:00 2001 References: bsc#1081910 Signed-off-by: Coly Li <colyli@suse.de> --- Incremental.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Incremental.c b/Incremental.c index 32090d9..a91129e 100644 --- a/Incremental.c +++ b/Incremental.c @@ -1030,12 +1030,12 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol, int mdfd = open_dev(chosen->sys_name); if (mdfd >= 0) { struct mddev_dev devlist; - char devname[20]; + char chosen_devname[24]; // 2*11 for int (including signs) + colon + null devlist.next = NULL; devlist.used = 0; devlist.writemostly = 0; - devlist.devname = devname; - sprintf(devname, "%d:%d", major(stb.st_rdev), + devlist.devname = chosen_devname; + sprintf(chosen_devname, "%d:%d", major(stb.st_rdev), minor(stb.st_rdev)); devlist.disposition = 'a'; close(dfd); -- 2.16.1
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