ensure buffer is large enough for two ints and some extras

This commit is contained in:
Bas van Schaik 2015-12-03 13:23:18 +00:00
parent 356e69de79
commit a90ed30e74
1 changed files with 1 additions and 1 deletions

View File

@ -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);