Jean Tourrilhes indicated that this driver is currently unmaintained.
Jeff, do you want this patch?
Jörn
--
Fancy algorithms are slow when n is small, and n is usually small.
Fancy algorithms have big constants. Until you know that n is
frequently going to be big, don't get fancy.
-- Rob Pike
SARLSTR is never called with nn bigger than 48. This patch should be
safe and severly reduces stack consumption.
Signed-off-by: Jörn Engel <joern@xxxxxxxxxxxxxxxxxxxx>
---
drivers/net/wireless/arlan-proc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.10cow/drivers/net/wireless/arlan-proc.c~arlan_stack
2004-09-04 22:59:04.000000000 +0200
+++ linux-2.6.10cow/drivers/net/wireless/arlan-proc.c 2005-02-03
21:29:33.000000000 +0100
@@ -28,9 +28,9 @@
}
#define SARLSTR(var,nn) {\
- char tmpStr[400];\
+ char tmpStr[50];\
int tmpLn = nn;\
- if (nn > 399 ) tmpLn = 399; \
+ BUG_ON(tmpLn > 49);\
memcpy(tmpStr,(char *) priva->conf->var,tmpLn);\
tmpStr[tmpLn] = 0; \
pos += sprintf(arlan_drive_info+pos, "%s\t=\t%s
\n",#var,priva->conf->var);\
|