mdopen: typo in buffer-length for a sprintf.
That '10000' should have been '1000'. Make it a 'sizeof' to avoid such carelessness. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
25956fef10
commit
e10a79c344
2
mdopen.c
2
mdopen.c
|
@ -88,7 +88,7 @@ void make_parts(char *dev, int cnt)
|
||||||
if (chmod(name, stb2.st_mode & 07777))
|
if (chmod(name, stb2.st_mode & 07777))
|
||||||
perror("chmod");
|
perror("chmod");
|
||||||
} else {
|
} else {
|
||||||
snprintf(sym, 10000, "%s%s%d", orig, odig?"p":"", i);
|
snprintf(sym, sizeof(sym), "%s%s%d", orig, odig?"p":"", i);
|
||||||
symlink(sym, name);
|
symlink(sym, name);
|
||||||
}
|
}
|
||||||
stat(name, &stb2);
|
stat(name, &stb2);
|
||||||
|
|
Loading…
Reference in New Issue