Hi,
I've just found a nasty bug, which prevented module unload from working
(perhaps only when compiled with gcc, had no time to check this). The
problem is a strcpy() with overlapping regions (gcc -fbounds-checking told
me, its great) in cmdPath.c. I changed it to a memmove, and the bug
vanished (on Solaris-2.5 and Linux).
Greetings, Swen
Here is the fix:
--- cmdPath.c.orig Fri Jul 1 01:17:13 1994
+++ cmdPath.c Thu Jul 25 15:32:51 1996
@@ -363,8 +363,9 @@
We must be in SW_STATE3 or not in SW_STATE at all.
Removing the marker should be just like removing any other path.
*/
- strcpy(oldpath + ((regexpPtr->startp[0] + start_offset) - oldpath),
- oldpath + ((regexpPtr->endp[0]) - oldpath));
+ memmove(oldpath + ((regexpPtr->startp[0] + start_offset) - oldpath),
+ oldpath + ((regexpPtr->endp[0]) - oldpath),
+ strlen(oldpath + ((regexpPtr->endp[0]) - oldpath)) + 1);
/*
* Cache the set. Clear the variable from the unset table just
|