Gonglei a08aaff811 virtio-crypto: fix possible integer and heap overflow
Because the 'size_t' type is 4 bytes in 32-bit platform, which
is the same with 'int'. It's easy to make 'max_len' to zero when
integer overflow and then cause heap overflow if 'max_len' is zero.

Using uint_64 instead of size_t to avoid the integer overflow.

Cc: qemu-stable@nongnu.org
Reported-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Tested-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-01-10 05:56:58 +02:00
..
2016-10-04 13:28:07 +01:00
2016-10-24 15:46:10 +02:00
2017-01-09 11:40:21 +00:00
2016-06-17 16:33:48 +10:00
2017-01-10 05:56:58 +02:00
2016-05-18 15:04:27 +03:00
2016-10-24 15:27:20 +02:00
2016-01-29 15:07:25 +00:00
2016-09-22 18:13:08 +01:00
2016-09-29 11:43:22 +08:00
2016-10-28 18:17:24 +03:00
2016-09-15 15:32:22 +03:00
2016-10-24 15:27:20 +02:00
2016-10-04 13:28:07 +01:00