From: Paul Larson <plars@austin.ibm.com>
To: tytso@mit.edu, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] Possible null pointer in drivers/serial/core.c
Date: 09 Oct 2002 13:17:19 -0500 [thread overview]
Message-ID: <1034187439.30975.29.camel@plars> (raw)
In core.c:uart_startup() line 210 I found a possible null pointer
dereference at line 210:
if (info->tty->termios->c_cflag & CBAUD)
There are other things around that same area that do the checking for
info->tty before dereferencing it, so either they are unneeded, or this
one needs a check too.
Thanks,
Paul Larson
--------------------
--- linux-2.5/drivers/serial/core.c Wed Oct 9 13:45:11 2002
+++ linux-corefix/drivers/serial/core.c Wed Oct 9 13:50:09 2002
@@ -207,7 +207,7 @@
* Setup the RTS and DTR signals once the
* port is open and ready to respond.
*/
- if (info->tty->termios->c_cflag & CBAUD)
+ if (info->tty && (info->tty->termios->c_cflag & CBAUD))
uart_set_mctrl(port, TIOCM_RTS | TIOCM_DTR);
}
reply other threads:[~2002-10-09 18:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1034187439.30975.29.camel@plars \
--to=plars@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®