Skip to content

Commit

Permalink
[PATCH] Fix NULL pointer dereference in isdn_tty_at_cout
Browse files Browse the repository at this point in the history
The changes in the tty related code introduced wrong parenthesis in a if
condition in the isdn_tty_at_cout function.  This caused access to index -1
in the dev->drv[] array.  This patch change it back to the correct
condition from the previous versions.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Karsten Keil authored and Linus Torvalds committed Feb 15, 2006
1 parent 8b09fb3 commit 61b9a26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/isdn/i4l/isdn_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -2359,8 +2359,8 @@ isdn_tty_at_cout(char *msg, modem_info * info)

/* use queue instead of direct, if online and */
/* data is in queue or buffer is full */
if ((info->online && tty_buffer_request_room(tty, l) < l) ||
(!skb_queue_empty(&dev->drv[info->isdn_driver]->rpqueue[info->isdn_channel]))) {
if (info->online && ((tty_buffer_request_room(tty, l) < l) ||
!skb_queue_empty(&dev->drv[info->isdn_driver]->rpqueue[info->isdn_channel]))) {
skb = alloc_skb(l, GFP_ATOMIC);
if (!skb) {
spin_unlock_irqrestore(&info->readlock, flags);
Expand Down

0 comments on commit 61b9a26

Please sign in to comment.