Page MenuHomeFreeBSD

bhyve: use stream_read() to read 12 bytes of RFB client version
AcceptedPublic

Authored by khng300_gmail.com on Sun, Feb 9, 3:51 PM.

Details

Reviewers
grehan
jhb
Group Reviewers
bhyve
Summary

The use of read() to read RFB client version before this change is inappropriate as it is not guaranteed to have exactly 12 bytes in the receive buffer.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 29263
Build 27180: arc lint + arc unit

Event Timeline

grehan accepted this revision.Mon, Feb 10, 2:22 AM
grehan added a subscriber: grehan.
grehan added inline comments.
usr.sbin/bhyve/rfb.c
774

Put in

#define VERSION_LENGTH  12

at the top, use that instead of 12, and this will be good to go.

This revision is now accepted and ready to land.Mon, Feb 10, 2:22 AM
lwhsu added a subscriber: lwhsu.Mon, Feb 10, 8:07 AM
  • bhyve: use stream_read() to read 12 bytes of RFB client version
This revision now requires review to proceed.Mon, Feb 10, 8:39 AM
khng300_gmail.com marked an inline comment as done.Mon, Feb 10, 8:40 AM

Updating D23591: bhyve: use stream_read() to read 12 bytes of RFB client version

usr.sbin/bhyve/rfb.c
774

Changed as suggested.

jhb accepted this revision.Thu, Feb 13, 5:07 PM
This revision is now accepted and ready to land.Thu, Feb 13, 5:07 PM