[PATCH 3/2] UEAGLE : cosmetic



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@xxxxxxx>
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)


Relevant Pages

  • cvs-src summary for May 31 - June 7
    ... You can get old summaries, and an HTML version of this one, at ... driver for Intel Ethernet cards, then the ndis driver, for emulation of ... Maxime Henrion changed the fxp driver to use the device sysctl tree, ... This bug is covered by `FreeBSD-SA-04:12.jailroute`_, ...
    (freebsd-current)
  • cvs-src summary for May 24-31
    ... Tony Ackerman committed the first release of the ixgb driver, ... Brooks Davis added support for a /etc/eui64 file, ... Oliver Eikemeier added a "-depth n" flag to find. ... Dag-Erling Smorgrav fixed a bug in the msync system call that permitted ...
    (freebsd-current)
  • cvs-src summary for January 4-10
    ... It is intended to help the FreeBSD community keep up with the fast-paced ... driver, for PS/2 mice. ... Ceri Davies is now a src committer, ... Important Bug Fixes ...
    (freebsd-current)
  • Re: MSI RS482M4-ILD (Radeon Xpress 200 chipset)
    ... It must be a KDE bug. ... Nvidia doesn't have a large presence). ... cards and network cards? ... much easier to report or even fix bugs myself in an opensource driver. ...
    (comp.os.linux.hardware)
  • Re: Limits to what can be done without source
    ... new version with their bug fixed. ... Well, OK, there is another vendor that ships binaries. ... at the device driver level on either features or reliability. ... done so for the functionality it claims to support. ...
    (Fedora)