diff options
author | Michael Hanselmann <public@hansmi.ch> | 2018-12-13 22:37:06 +0000 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-12-14 08:57:17 +0100 |
commit | 90c1a74271ce4667d16eeca575dfa78a6c7d465c (patch) | |
tree | eaf9de9bb8605ef17ace6c80cd5fb781f092016d /hw/timer/sun4v-rtc.c | |
parent | bab9df35ce73d1c8e19a37e2737717ea1c984dc1 (diff) |
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/timer/sun4v-rtc.c')
0 files changed, 0 insertions, 0 deletions