HomeFreeBSD

1) Prevent out of bounds access to ws[-1] (passed buffer) which happens

Description

  1. Prevent out of bounds access to ws[-1] (passed buffer) which happens

when the first mb sequence is incomplete and there are not enougn chars in
the read buffer. ws[-1] may lead to memory faults or false results, in
case the memory here contains '\n'.

  1. Fix EOF checking I mess in my previos r305406 commit.

MFC after: 3 days

Details

Provenance
acheAuthored on
Parents
rS305408: hyperv/hn: Stringent NVS RNDIS packets length checks.
Branches
Unknown
Tags
Unknown