Skip to contentSkip to conversation

mdopen: Prevent overrunning the devname buffer when copying devnm into it for long md names.

PATCH Superseded Robert LeBlanc 1 participant 1 message Aug 23, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mdopen: Prevent overrunning the devname buffer when copying devnm into it for long md names.

Signed-Off: Robert LeBlanc<[email protected]>

---
 mdopen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mdopen.c +1 -1
index f818fdf..5af344b 100644
@@ -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)
Signature · 1 line
2.9.3