Marcel Apfelbaum d6b6abc51d fw_cfg: fix memory corruption when all fw_cfg slots are used
When all the fw_cfg slots are used, a write is made outside the
bounds of the fw_cfg files array as part of the sort algorithm.

Fix it by avoiding an unnecessary array element move.
Fix also an assert while at it.

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Message-Id: <20180108215007.46471-1-marcel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-01-19 11:18:51 -02:00
..
2018-01-08 11:18:23 +01:00
2018-01-19 11:18:51 -02:00
2017-12-18 17:07:02 +03:00
2017-10-27 16:03:54 +02:00
2017-12-18 17:07:02 +03:00
2018-01-19 11:18:51 -02:00
2017-12-18 17:07:03 +03:00
2017-08-30 18:23:25 +02:00