Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
mdadm.5365
0218-mdopen-Prevent-overrunning-the-devname-buf...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0218-mdopen-Prevent-overrunning-the-devname-buffer-when-c.patch of Package mdadm.5365
From bd1fd72e13652416da4c646ea47549fcfdf49b26 Mon Sep 17 00:00:00 2001 From: Robert LeBlanc <robert@leblancnet.us> Date: Wed, 24 Aug 2016 10:10:44 -0600 Subject: [PATCH 304/359] mdopen: Prevent overrunning the devname buffer when copying devnm into it for long md names. References: bsc#1081910 Linux allows for 32 character device names. When using the maximum size device name and also storing "/dev/", devname needs to be 37 character long to store the complete device name. i.e. "/dev/md_abcdefghijklmnopqrstuvwxyz12\0" Signed-off-by: Robert LeBlanc<robert@leblancnet.us> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Coly Li <colyli@suse.de> --- mdopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdopen.c b/mdopen.c index f818fdf..5af344b 100644 --- a/mdopen.c +++ b/mdopen.c @@ -144,7 +144,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy, struct createinfo *ci = conf_get_create_info(); int parts; char *cname; - char devname[20]; + char devname[37]; char devnm[32]; char cbuf[400]; if (chosen == NULL) -- 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