]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ws: fix CONT opcode check
authorDaniel Stenberg <daniel@haxx.se>
Thu, 27 Apr 2023 07:30:55 +0000 (09:30 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 27 Apr 2023 09:08:48 +0000 (11:08 +0200)
Detected by Coverity. Follow-up to 930c00c259

Closes #11037

lib/ws.c

index 71ad2ccb81968a5337b76ccc8a694c6ee78d2171..c60bbc95b387978e025462d21e63d8c8998a8169 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -353,7 +353,8 @@ static void ws_enc_info(struct ws_encoder *enc, struct Curl_easy *data,
 {
   infof(data, "WS-ENC: %s [%s%s%s payload=%zd/%zd]", msg,
         ws_frame_name_of_op(enc->firstbyte),
-        (enc->firstbyte & WSBIT_OPCODE_CONT)? " CONT" : "",
+        (enc->firstbyte & WSBIT_OPCODE_MASK) == WSBIT_OPCODE_CONT ?
+        " CONT" : "",
         (enc->firstbyte & WSBIT_FIN)? "" : " NON-FIN",
         enc->payload_len - enc->payload_remain, enc->payload_len);
 }