exec: Fix bounce buffer allocation in address_space_map()
commite85d9db5f6f86299688a0acd2796ac1ccc96610c
authorKevin Wolf <kwolf@redhat.com>
Mon, 22 Jul 2013 12:30:23 +0000 (22 14:30 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 28 Oct 2013 16:34:42 +0000 (28 17:34 +0100)
tree99fb4856c690f009d589581d4dcd1dd31a0edfe5
parentba2ab2f2ca4150a7e314fbb19fa158bd8ddc36eb
exec: Fix bounce buffer allocation in address_space_map()

This fixes a regression introduced by commit e3127ae0c, which kept the
allocation size of the bounce buffer limited to one page in order to
avoid unbounded allocations (as explained in the commit message of
6d16c2f88), but broke the reporting of the shortened bounce buffer to
the caller. The caller therefore assumes that the full requested size
was provided and causes memory corruption when writing beyond the end of
the actually allocated buffer.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
exec.c