From: Kevin Corry <kevcorry@us.ibm.com>
Fix an OB1 error when calculating an output buffer size, that could cause a
missing null termininator in the 'list devices' ioctl results. [Steffan
Paletta]
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
for (i = 0; i < NUM_BUCKETS; i++) {
list_for_each_entry (hc, _name_buckets + i, name_list) {
needed += sizeof(struct dm_name_list);
- needed += strlen(hc->name);
+ needed += strlen(hc->name) + 1;
needed += ALIGN_MASK;
}
}