char: remove fixed length filename allocation
commit0ff0fad23d3693ecf7a0c462cdb48f0e60f93808
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 19 Jan 2016 11:14:28 +0000 (19 11:14 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 Jan 2016 14:50:54 +0000 (26 15:50 +0100)
treeadc7766f25c5ff425fc63f3e89e5f5ef084ce8ae
parent3db34bf64ab4f8797565dd8750003156c32b301d
char: remove fixed length filename allocation

A variety of places were snprintf()ing into a fixed length
filename buffer. Some of the buffers were stack allocated,
while another was heap allocated with g_malloc(). Switch
them all to heap allocated using g_strdup_printf() avoiding
arbitrary length restrictions.

This also facilitates later patches which will want to
populate the filename by calling external functions
which do not support use of a pre-allocated buffer.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <1453202071-10289-2-git-send-email-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-char.c