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>
| commit | 225ef1baeb0e49f157f3ba1271915e623bd27dd9 |
| parent | e5dfb098638628b0215e11791bce372a656af390 |
| author | Alex Trotsenko <alex1973tr@gmail.com> |
| committer | Alex Trotsenko <alex1973tr@gmail.com> |
| commit time | Sat, 22 Apr 2017 17:18:49 +0000 |