I get a segmentation fault when I use WPA with wlassistant. I tracked it down to an unchecked call to readlink() at src/watools.cpp:232. In my case, I'm using the wext driver so returning an empty string works. The attached patch works around the seg fault.
--- orig_src/watools.cpp 2008-11-06 22:56:55.000000000 -0800
+++ src/watools.cpp 2008-11-06 22:55:55.000000000 -0800
@@ -229,7 +229,8 @@
sprintf( origPath, "/sys/class/net/%s/device/driver", _ifname );
memset( &symPath, 0, sizeof(symPath) );
- readlink( (const char*)origPath, symPath, sizeof(symPath) );
+ if (readlink( (const char*)origPath, symPath, sizeof(symPath) ) == -1)
+ return "";
p = strtok( symPath, "/" );
strcpy( module, p );
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.