[Spice-devel] [PATCH v2 6/8] replay: Assure read_binary receives a NULL pointer
Pavel Grunt
pgrunt at redhat.com
Fri Sep 16 10:41:31 UTC 2016
On Thu, 2016-09-15 at 23:19 +0100, Frediano Ziglio wrote:
> read_binary do not allocate a buffer for no-NULL pointers.
> Avoid using uninitialized data and allocate proper buffer.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
> ---
> server/red-replay-qxl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
> index ef5569e..45c105c 100644
> --- a/server/red-replay-qxl.c
> +++ b/server/red-replay-qxl.c
> @@ -1089,7 +1089,7 @@ static QXLUpdateCmd
> *red_replay_update_cmd(SpiceReplay *replay)
>
> static QXLMessage *red_replay_message(SpiceReplay *replay)
> {
> - QXLMessage *qxl;
> + QXLMessage *qxl = NULL;
> size_t size;
>
> read_binary(replay, "message", &size, (uint8_t**)&qxl,
> sizeof(QXLMessage));
>
More information about the Spice-devel
mailing list