public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Horst Schirmeier <horst@schirmeier.com>
Cc: gregkh@suse.de, trivial@rustcorp.com.au, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.13-rc3-git9] pl2303: pl2303_update_line_status data length fix
Date: Mon, 8 Aug 2005 15:24:23 -0700	[thread overview]
Message-ID: <20050808222423.GA4550@kroah.com> (raw)
In-Reply-To: <20050728133220.GJ25889@quickstop.soohrt.org>

On Thu, Jul 28, 2005 at 03:32:20PM +0200, Horst Schirmeier wrote:
> Minimum data length must be UART_STATE + 1, as data[UART_STATE] is being
> accessed for the new line_state. Although PL-2303 hardware is not
> expected to send data with exactly UART_STATE length, this keeps it on
> the safe side.
> 
> Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
> ---
> 
> --- linux-2.6.13-rc3-git9/drivers/usb/serial/pl2303.c.orig	2005-07-28 14:42:58.000000000 +0200
> +++ linux-2.6.13-rc3-git9/drivers/usb/serial/pl2303.c	2005-07-28 14:43:16.000000000 +0200
> @@ -826,7 +826,7 @@ static void pl2303_update_line_status(st
>  	struct pl2303_private *priv = usb_get_serial_port_data(port);
>  	unsigned long flags;
>  	u8 status_idx = UART_STATE;
> -	u8 length = UART_STATE;
> +	u8 length = UART_STATE + 1;

"safe side" yes, but this will just prevent any line changes from going
back to the user, right?

Hm, how is this working at all, it looks like we overflow the buffer...

Have you tested this change?

thanks,

greg k-h

  reply	other threads:[~2005-08-08 22:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-28 13:32 [PATCH 2.6.13-rc3-git9] pl2303: pl2303_update_line_status data length fix Horst Schirmeier
2005-08-08 22:24 ` Greg KH [this message]
2005-08-08 23:04   ` Horst Schirmeier

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=20050808222423.GA4550@kroah.com \
    --to=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=horst@schirmeier.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    /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