Fix possible UB in read() under Unix


If the user calls setReadBufferSize() with a value lesser than the
current size of the read buffer, then we get UB in readNotification():

  readFromPort(nullptr, some_negative_value);

Change-Id: Iddf5838c84c8615670285e9883c48f29faacc07e
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
commit225ef1baeb0e49f157f3ba1271915e623bd27dd9
parente5dfb098638628b0215e11791bce372a656af390
authorAlex Trotsenko <alex1973tr@gmail.com>
committerAlex Trotsenko <alex1973tr@gmail.com>
commit timeSat, 22 Apr 2017 17:18:49 +0000