Swatantra-66 commented on code in PR #3949:
URL: https://github.com/apache/nuttx-apps/pull/3949#discussion_r4431195109


##########
system/vncviewer/rfb_protocol.c:
##########
@@ -539,35 +542,56 @@ static int rfb_negotiate_security(int sockfd, const char 
*password)
     {
       /* Connection failed - read reason string */
 
-      uint32_t reason_len;
       rfb_recv_exact(sockfd, &reason_len, 4);
       reason_len = ntohl(reason_len);
       printf("vncviewer: connection refused by server\n");
       return -ECONNREFUSED;
     }
 
-  /* Receive security type list */
+  /* Receive and examine security types in chunks to bound stack usage.
+   * Prefer None, fallback to VNC Auth.
+   */
 
-  ret = rfb_recv_exact(sockfd, types, num_types);
-  if (ret < 0)
+  chosen = RFB_SEC_INVALID;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to