[Spice-commits] server/red-replay-qxl.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri Sep 16 11:01:54 UTC 2016


 server/red-replay-qxl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bd8ccfcd7883218f26320e948f691ad0c233ae37
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Thu Sep 15 18:25:22 2016 +0100

    replay: Assure read_binary receives a NULL pointer
    
    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>

diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
index b17c38b..a0e1629 100644
--- a/server/red-replay-qxl.c
+++ b/server/red-replay-qxl.c
@@ -1007,7 +1007,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-commits mailing list