Searched hist:"179 a5bc4b8cbe68ca675057b960dd805867e41c4" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/net/9p/ |
H A D | trans_virtio.c | diff 179a5bc4b8cbe68ca675057b960dd805867e41c4 Tue Jan 27 07:00:19 CST 2015 Andrey Ryabinin <a.ryabinin@samsung.com> 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 <a.ryabinin@samsung.com> Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
|