[PATCH spice-server 14/30] Fix check for header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]