All of lore.kernel.org
 help / color / mirror / Atom feed
From: matthieu castet <castet.matthieu@free.fr>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org, usbatm@lists.infradead.org,
	linux-usb-devel@lists.sourceforge.net,
	ueagle <ueagleatm-dev@gna.org>
Subject: [PATCH 3/2] UEAGLE : cosmetic
Date: Sat, 14 Jan 2006 12:42:30 +0100	[thread overview]
Message-ID: <43C8E3A6.2050103@free.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

Hi,

this patch correct a possible bug with cmv_name being static. If there 
is 2 modems and the driver is scheduled when filling cmv_name this could 
result with garbage in cmv_name. We allocate cmv_name on the stack but 
with a small size in order to avoid that.


Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>

[-- Attachment #2: ueagle_cmv_name --]
[-- Type: text/plain, Size: 518 bytes --]

Index: Linux/drivers/usb/atm/ueagle-atm.c
===================================================================
--- Linux.orig/drivers/usb/atm/ueagle-atm.c	2006-01-14 12:37:00.000000000 +0100
+++ Linux/drivers/usb/atm/ueagle-atm.c	2006-01-14 12:37:39.000000000 +0100
@@ -1012,7 +1012,7 @@
 	int ret, size;
 	u8 *data;
 	char *file;
-	static char cmv_name[256] = FW_DIR;
+	char cmv_name[FIRMWARE_NAME_MAX]; /* 30 bytes stack variable */
 
 	if (cmv_file[sc->modem_index] == NULL) {
 		if (UEA_CHIP_VERSION(sc) == ADI930)

                 reply	other threads:[~2006-01-14 11:41 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=43C8E3A6.2050103@free.fr \
    --to=castet.matthieu@free.fr \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=ueagleatm-dev@gna.org \
    --cc=usbatm@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.