diff options
author | Neil Brown <neilb@suse.de> | 2006-10-19 08:38:20 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-10-19 08:38:20 +0200 |
commit | 26a0b8fd7a80419662c0171b91e95e5057af598e (patch) | |
tree | 3fe690e6a9219ab2164e22bbab8287e2cd30fa94 /super1.c | |
parent | Don't trigger and error on -As if all arrays are already started. (diff) | |
download | mdadm-26a0b8fd7a80419662c0171b91e95e5057af598e.tar.xz mdadm-26a0b8fd7a80419662c0171b91e95e5057af598e.zip |
Fix array-subscript error.
->name is sized to '33' to have room for a trailing nul,
but thhat needs to get put in position '32'. Doh!
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -546,7 +546,7 @@ static int update_super1(struct mdinfo *info, void *sbv, char *update, strncpy(info->name, c+1, 31 - (c-sb->set_name)); else strncpy(info->name, sb->set_name, 32); - info->name[33] = 0; + info->name[32] = 0; } if (strcmp(update, "name") == 0) { if (info->name[0] == 0) |