[PATCH] UEAGLE : cmv name bug (was cosmetic)

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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---
commit fdf290fd6d6a17b40055359263ed6003e87cb89b
tree 52d27ebf44609f4d4083596919f3e11395fb5e40
parent e40abaf6336ef3756277bab70db47a47da4aa325
author matthieu castet <[EMAIL PROTECTED]> Wed, 18 Jan 2006 07:39:27 +0100
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Tue, 31 Jan 2006 17:23:41 -0800

 drivers/usb/atm/ueagle-atm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index b0026ec..830d2c9 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -1013,7 +1013,7 @@ static int request_cmvs(struct uea_softc
        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)



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to