Files
qemu/hw
Haozhong Zhang c8e6c93857 nvdimm: fix header pointer in nvdimm_build_nfit()
In the current nvdimm_build_nfit(), the pointer 'header' initially equals
to table_data->data + table_data->len. However, the following
g_array_append_vals(table_data, structures->data, structures->len)
may resize and relocate table_data->data[]. Therefore, the usage of 'header'
afterwards may be illegal.

This patch fixes this issue by storing an offset within table_data->data[]
(rather than an address) in 'header'.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-01-08 16:01:37 +02:00
..
2015-12-04 09:39:55 +03:00
2015-12-17 17:33:47 +01:00
2015-10-02 16:22:02 -03:00
2015-09-25 12:04:43 +02:00
2015-10-27 15:59:46 +00:00
2015-11-24 14:56:49 -05:00
2015-12-22 18:39:19 +02:00
2015-09-25 12:04:43 +02:00
2015-09-07 10:39:28 +01:00
2016-01-08 09:29:24 +01:00
2015-09-25 14:52:17 +02:00
2015-12-22 18:39:19 +02:00