[Spice-devel] [PATCH spice-server 14/30] Fix check for header
Frediano Ziglio
fziglio at redhat.com
Mon Nov 21 12:52:01 UTC 2016
frame_bytes_needed returns the bytes left so the correct
check is testing there are no needed bytes.
---
server/websocket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/websocket.c b/server/websocket.c
index fdf36c3..a92e07d 100644
--- a/server/websocket.c
+++ b/server/websocket.c
@@ -177,7 +177,7 @@ static int websocket_get_frame_header(websocket_frame_t *frame)
int fin;
int used = 0;
- if (frame->header_pos < frame_bytes_needed(frame))
+ if (frame_bytes_needed(frame) > 0)
return 0;
fin = frame->header[0] & FIN_FLAG;
--
2.7.4
More information about the Spice-devel
mailing list