commit d86fc5ca7bb6b952151e7e671349d312060f20d7
Author: Karsten Keil <[EMAIL PROTECTED]>
Date:   Fri Jan 25 11:55:28 2008 +0100

    fix oops on rmmod capidrv
    
    commit eb36f4fc019835cecf0788907f6cab774508087b upstream.
    
    Fix overwriting the stack with the version string
    (it is currently 10 bytes + zero) when unloading the
    capidrv module. Safeguard against overwriting it
    should the version string grow in the future.
    
    Should fix Kernel Bug Tracker Bug 9696.
    
    Signed-off-by: Gerd v. Egidy <[EMAIL PROTECTED]>
    Acked-by: Karsten Keil <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
index 48c1775..cb42b69 100644
--- a/drivers/isdn/capi/capidrv.c
+++ b/drivers/isdn/capi/capidrv.c
@@ -2332,13 +2332,14 @@ static int __init capidrv_init(void)
 
 static void __exit capidrv_exit(void)
 {
-       char rev[10];
+       char rev[32];
        char *p;
 
        if ((p = strchr(revision, ':')) != 0) {
-               strcpy(rev, p + 1);
-               p = strchr(rev, '$');
-               *p = 0;
+               strncpy(rev, p + 1, sizeof(rev));
+               rev[sizeof(rev)-1] = 0;
+               if ((p = strchr(rev, '$')) != 0)
+                       *p = 0;
        } else {
                strcpy(rev, " ??? ");
        }
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to