From: Andrey Ryabinin Date: Tue, 27 Jan 2015 13:00:19 +0000 (+0300) Subject: net/9p: use memcpy() instead of snprintf() in p9_mount_tag_show() X-Git-Tag: omap-for-v4.2/o2_dc~84^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=179a5bc4b8cbe68ca675057b960dd805867e41c4;p=pandora-kernel.git net/9p: use memcpy() instead of snprintf() in p9_mount_tag_show() p9_mount_tag_show() uses '%s' format string to print non-NULL terminated chan->tag string. This leads to out of bounds memory read, because format '%s' implies that string is NULL-terminated. The length of string is know here, so its simpler and safer to use memcpy instead of snprintf(). Signed-off-by: Andrey Ryabinin Signed-off-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen --- Reading git-diff-tree failed