slirp/smb: Replace constant strings by glib string
commitf95cc8b6cc3ad8c4b687f305a978d67091c28138
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 7 Apr 2017 14:32:54 +0000 (7 15:32 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 29 Apr 2017 16:29:58 +0000 (29 18:29 +0200)
tree1aefed00a6f464ceade60fb908fb97bc21bf1d4b
parent0bed71edbc323de12ed1e5390a85a013f6a143f4
slirp/smb: Replace constant strings by glib string

gcc 7 (on fedora 26) objects to many of the snprintf's
in the smb path and command creation because it can't
figure out that the smb_dir (i.e. the /tmp dir for the configuration)
is known to be short.

Replace all these fixed length buffers by g_str* functions that dynamically
allocate and use g_dir_make_tmp to make the directory.
(It's fairly new glib but we have a compat function for it).

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
net/slirp.c