Re: [Qemu-devel] [PATCH] qga: check bytes count read by guest-file-read

2018-06-13 Thread Daniel P . Berrangé
On Wed, Jun 13, 2018 at 11:46:57AM +0530, P J P wrote: > From: Prasad J Pandit > > While reading file content via 'guest-file-read' command, > 'qmp_guest_file_read' routine allocates buffer of count+1 > bytes. It could overflow for large values of 'count'. > Add check to avoid it. No objection t

[Qemu-devel] [PATCH] qga: check bytes count read by guest-file-read

2018-06-12 Thread P J P
From: Prasad J Pandit While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli Signed-off-by: Prasad J Pandit --- qga/commands-p