From 2677d371ed65941912149218fb5683f0b8db0760 Mon Sep 17 00:00:00 2001 From: jipengfei_yewu Date: Mon, 18 Dec 2023 09:57:38 +0000 Subject: [PATCH] ui/vnc: fix debug output for invalid audio message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The debug message was cut and pasted from the invalid audio format case, but the audio message is at bytes 2-3. cheery-pick from 0cb9c5880e6b8dedc4e20026ce859dd1ea9aac84 Signed-off-by: jipengfei_yewu Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- ui/vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index f4322a9065..f8978b0e65 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2567,7 +2567,7 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) vs, vs->ioc, vs->as.fmt, vs->as.nchannels, vs->as.freq); break; default: - VNC_DEBUG("Invalid audio message %d\n", read_u8(data, 4)); + VNC_DEBUG("Invalid audio message %d\n", read_u8(data, 2)); vnc_client_error(vs); break; } -- 2.27.0