public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/2] UEAGLE : cosmetic
@ 2006-01-14 11:42 matthieu castet
  0 siblings, 0 replies; only message in thread
From: matthieu castet @ 2006-01-14 11:42 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel, usbatm, linux-usb-devel, ueagle

[-- 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-14 11:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-14 11:42 [PATCH 3/2] UEAGLE : cosmetic matthieu castet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox