Do the check after replay_fscanf to make sure everything
is fine before calling red_replay_compat_drawable or
red_replay_native_drawable.

Signed-off-by: Frediano Ziglio <fzig...@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 a5b9553..5fcb243 100644
--- a/server/red-replay-qxl.c
+++ b/server/red-replay-qxl.c
@@ -1063,10 +1063,10 @@ static QXLCompatDrawable 
*red_replay_compat_drawable(SpiceReplay *replay, uint32
 
 static QXLPHYSICAL red_replay_drawable(SpiceReplay *replay, uint32_t flags)
 {
+    replay_fscanf(replay, "drawable\n");
     if (replay->error) {
         return 0;
     }
-    replay_fscanf(replay, "drawable\n");
     if (flags & QXL_COMMAND_FLAG_COMPAT) {
         return QXLPHYSICAL_FROM_PTR(red_replay_compat_drawable(replay, flags));
     } else {
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to