diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-02-16 15:31:56 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2017-02-17 17:19:06 +0000 |
commit | 560a6c3823cf560b883e29db0a403517def86639 (patch) | |
tree | 9bdc7d4bc914cb4698af10b329bbe31d4a2e0a82 /cmake | |
parent | 48eff6a36bac1526756bbb42a8c9841641792938 (diff) | |
download | wireshark-560a6c3823cf560b883e29db0a403517def86639.tar.gz |
Rawshark: Try to avoid a VC runtime crash.
The MSDN documentation for _read says
"If fd is invalid, the file is not open for reading, or the file is
locked, the invalid parameter handler is invoked, as described in
Parameter Validation."
This means that on Windows, if our parent has closed stdin when we call
_read we'll crash. Add a check to bail out early if that's happened.
Fix a sign cast while we're here.
Change-Id: I8afb75f6e56c6a6c2b62103ba7e2fb635dc85702
Reviewed-on: https://code.wireshark.org/review/20153
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'cmake')
0 files changed, 0 insertions, 0 deletions