From: Dan Carpenter Date: Thu, 5 Dec 2013 14:53:50 +0000 (+0300) Subject: mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes() X-Git-Tag: v3.15-rc1~65^2~117 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4c233057771581698a13694ab6f33b48ce837dc;p=pandora-kernel.git mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes() We always put a NUL terminator one space past the end of the "vendor" buffer. Walter Harms also pointed out that this should just use kstrndup(). Fixes: 7d17c02a01a1 ('mtd: Add new SmartMedia/xD FTL') Signed-off-by: Dan Carpenter Signed-off-by: Brian Norris --- Reading git-diff-tree failed