summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2015-06-17 14:45:03 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-06-19 12:17:49 +0200
commit5ba03e2dd785362026917e4cc8a1fd2c64e8e62c (patch)
treec85886ba98e633bc03eb7fa7e69a5561b78c0250 /net
parent1717388645670336c48aa05d19b0acd07687a821 (diff)
downloadhqemu-5ba03e2dd785362026917e4cc8a1fd2c64e8e62c.zip
hqemu-5ba03e2dd785362026917e4cc8a1fd2c64e8e62c.tar.gz
hw/core: rebase sysbus_get_fw_dev_path() to g_strdup_printf()
This is done mainly for improving readability, and in preparation for the next patch, but Markus pointed out another bonus for the string being returned: "No arbitrary length limit. Before the patch, it's 39 characters, and the code breaks catastrophically when qdev_fw_name() is longer: the second snprintf() is called with its first argument pointing beyond path[], and its second argument underflowing to a huge size." Cc: qemu-stable@nongnu.org Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud