spapr_iommu: use g_strdup_printf() instead of snprintf()
commita205a053dcfd89c7ab57aef48d26cd9349388933
authorGreg Kurz <groug@kaod.org>
Tue, 25 Jul 2017 17:58:40 +0000 (25 19:58 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 Sep 2017 23:30:54 +0000 (8 09:30 +1000)
tree1bedf500a5a235433844910ed75c3409f3513877
parent5c3d70e9701402e2755cf5d43f62a305ade4def2
spapr_iommu: 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_iommu.c