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)
committerGreg Kurz <groug@kaod.org>
Wed, 20 Sep 2017 06:48:52 +0000 (08:48 +0200)
commit772a73692ecb52bace0cff6f95df62f59b8cabe0
tree64216246ad36d3af41ad089c18652301cfa62315
parent4d8bc7334b06ef01a21cad3d1eb8dc183037a06b
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>
hw/9pfs/9p.c