From: Kevin Corry 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 --- 25-akpm/drivers/md/dm-ioctl.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/md/dm-ioctl.c~dm-ioctlc-fix-off-by-one-error drivers/md/dm-ioctl.c --- 25/drivers/md/dm-ioctl.c~dm-ioctlc-fix-off-by-one-error Wed May 26 15:42:30 2004 +++ 25-akpm/drivers/md/dm-ioctl.c Wed May 26 15:42:30 2004 @@ -377,7 +377,7 @@ static int list_devices(struct dm_ioctl 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; } } _