From: matthieu castet Date: Wed, 18 Jan 2006 06:39:27 +0000 (+0100) Subject: [PATCH] UEAGLE : cmv name bug (was cosmetic) X-Git-Tag: v2.6.16-rc2~197 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdf290fd6d6a17b40055359263ed6003e87cb89b;p=linux-2.6 [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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index b0026ecc6a..830d2c9826 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 *sc, 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)