summaryrefslogtreecommitdiffstats
path: root/hw/misc/tz-mpc.c
diff options
context:
space:
mode:
authorMichael Hanselmann2018-12-13 23:37:06 +0100
committerGerd Hoffmann2018-12-14 08:57:17 +0100
commit90c1a74271ce4667d16eeca575dfa78a6c7d465c (patch)
treeeaf9de9bb8605ef17ace6c80cd5fb781f092016d /hw/misc/tz-mpc.c
parentusb-mtp: use O_NOFOLLOW and O_CLOEXEC. (diff)
downloadqemu-90c1a74271ce4667d16eeca575dfa78a6c7d465c.tar.gz
qemu-90c1a74271ce4667d16eeca575dfa78a6c7d465c.tar.xz
qemu-90c1a74271ce4667d16eeca575dfa78a6c7d465c.zip
usb-mtp: Limit filename to object information size
The filename length in MTP metadata is specified by the guest. By trusting it directly it'd theoretically be possible to get the host to write memory parts outside the filename buffer into a filename. In practice though there are usually NUL bytes stopping the string operations. Also use the opportunity to not assign the filename member twice. Signed-off-by: Michael Hanselmann <public@hansmi.ch> Message-id: ab70659d8d5c580bdf150a5f7d5cc60c8e374ffc.1544740018.git.public@hansmi.ch [ kraxel: codestyle fix: break a long line ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/misc/tz-mpc.c')
0 files changed, 0 insertions, 0 deletions