diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-02-04 18:52:05 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-02-04 18:52:05 +0100 |
commit | 9a54b8d78e9d63987379206a0cbc856c46a2ef44 (patch) | |
tree | 55f8cb2aa713dfa37343be90e4c80f1a509a1ea7 /i386/i386at | |
parent | 03df518586e3cfd106eb20827781f12a0596e48c (diff) |
Fix potential NULL dereference
Found by Coverity.
* i386/i386at/com.c (comopen): On com_reprobe() returning success, check
for `isai' again.
Diffstat (limited to 'i386/i386at')
-rw-r--r-- | i386/i386at/com.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/i386/i386at/com.c b/i386/i386at/com.c index 8f293af..e1ba71a 100644 --- a/i386/i386at/com.c +++ b/i386/i386at/com.c @@ -338,6 +338,8 @@ io_return_t comopen( */ if (!com_reprobe(unit)) return D_NO_SUCH_DEVICE; + if ((isai = cominfo[unit]) == 0 || isai->alive == 0) + return D_NO_SUCH_DEVICE; } tp = &com_tty[unit]; |