]> git.ipfire.org Git - thirdparty/qemu.git/commit
9pfs: check the size of transport buffer before marshaling
authorJan Dakinevich <jan.dakinevich@gmail.com>
Wed, 20 Sep 2017 06:48:52 +0000 (08:48 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 22 Sep 2017 23:23:16 +0000 (18:23 -0500)
commita83858fdb57e91945f2ea95f7ec31b89ccfd46ca
treea530b9b906bb836a7acec056045a24850c1f1794
parentd13a0bde83d216ec07d2fe6e54fe1bab34643db1
9pfs: check the size of transport buffer before marshaling

v9fs_do_readdir_with_stat() should check for a maximum buffer size
before an attempt to marshal gathered data. Otherwise, buffers assumed
as misconfigured and the transport would be broken.

The patch brings v9fs_do_readdir_with_stat() in conformity with
v9fs_do_readdir() behavior.

Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com>
[groug, regression caused my commit 8d37de41cab1 # 2.10]
Signed-off-by: Greg Kurz <groug@kaod.org>
(cherry picked from commit 772a73692ecb52bace0cff6f95df62f59b8cabe0)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/9pfs/9p.c