File 0127-ensure-buffer-is-large-enough-for-two-ints-and-some-.patch of Package mdadm.5365

From: Bas van Schaik <bas@traiectum.net>
Date: Thu, 3 Dec 2015 13:23:18 +0000
Subject: [PATCH 182/359] ensure buffer is large enough for two ints and some
 extras
From a90ed30e743c37eb53c3c0ad003e4e09abf78aac Mon Sep 17 00:00:00 2001
References: bsc#1081910


Signed-off-by: Coly Li <colyli@suse.de>
---
 Incremental.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Incremental.c b/Incremental.c
index 781d27d..32090d9 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -663,7 +663,7 @@ static void find_reject(int mdfd, struct supertype *st, struct mdinfo *sra,
 			 * without thinking more */
 
 	for (d = sra->devs; d ; d = d->next) {
-		char dn[10];
+		char dn[24]; // 2*11 bytes for ints (including sign) + colon + null byte
 		int dfd;
 		struct mdinfo info;
 		sprintf(dn, "%d:%d", d->disk.major, d->disk.minor);
-- 
2.16.1

openSUSE Build Service is sponsored by