buf is a stack variable, so it may be destroyed by the time it's used by output_stream::write(). Spotted while auditing the code. Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>