Laszlo Ersek 5ba03e2dd7 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>
2015-06-19 12:17:49 +02:00
..
2015-04-27 18:24:18 +02:00
2015-06-01 14:18:55 +02:00
2015-05-29 11:28:59 +01:00
2015-06-01 14:18:55 +02:00
2015-04-30 16:06:18 +03:00
2015-04-30 16:05:48 +03:00
2015-06-03 18:19:18 +02:00
2014-10-24 12:19:11 +01:00
2015-05-31 16:26:41 +02:00
2015-03-19 11:11:55 +03:00
2015-06-01 14:18:54 +02:00
2015-03-10 17:07:28 +01:00
2015-05-11 13:54:00 +01:00