Page MenuHomeFreeBSD

D37117.diff
No OneTemporary

D37117.diff

diff --git a/usr.sbin/bhyve/rfb.c b/usr.sbin/bhyve/rfb.c
--- a/usr.sbin/bhyve/rfb.c
+++ b/usr.sbin/bhyve/rfb.c
@@ -885,9 +885,12 @@
/* 1b. Read client version */
len = stream_read(cfd, buf, VERSION_LENGTH);
- if (len == VERSION_LENGTH && !strncmp(vbuf, buf, VERSION_LENGTH - 2)) {
- client_ver = buf[VERSION_LENGTH - 2];
+ if (len != VERSION_LENGTH ||
+ strncmp(vbuf, buf, VERSION_LENGTH - 2) != 0) {
+ goto done;
}
+
+ client_ver = buf[VERSION_LENGTH - 2];
if (client_ver != CVERS_3_8 && client_ver != CVERS_3_7) {
/* only recognize 3.3, 3.7 & 3.8. Others dflt to 3.3 */
client_ver = CVERS_3_3;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 6:53 AM (21 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14654805
Default Alt Text
D37117.diff (619 B)

Event Timeline