spapr_drc: use g_strdup_printf() instead of snprintf()
commitf5babeacc4abccbb32f318278135a43477bdaa20
authorGreg Kurz <groug@kaod.org>
Tue, 25 Jul 2017 17:58:53 +0000 (25 19:58 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 Sep 2017 23:30:54 +0000 (8 09:30 +1000)
treec6b9868df124e4882de59fe53242fc0ee34a1eee
parenta205a053dcfd89c7ab57aef48d26cd9349388933
spapr_drc: use g_strdup_printf() instead of snprintf()

Passing a stack allocated buffer of arbitrary length to snprintf()
without checking the return value can cause the resultant strings
to be silently truncated.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_drc.c