Brian Fundakowski Feldman wrote:
> Forget anything I said about KAME being the strong possibility :)  As
> soon as peter noted what commit it could have to do with, I figured
> it out and fixed it; after testing, I committed it.  Be happy :)

Your fix suffers from exactly the same problem..  Suppose down the track
that ucontext_t becomes smaller than 'struct sigocontext' ?  You're then
failing what would have worked.  The check against sizeof osigcontext should
not be fatal.

Index: machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
retrieving revision 1.378
diff -u -r1.378 machdep.c
--- machdep.c   1999/11/23 04:09:13     1.378
+++ machdep.c   1999/11/23 05:49:46
@@ -871,14 +871,16 @@
 {
        struct trapframe *regs;
        ucontext_t *ucp;
+       struct osigcontext *scp;
        int cs, eflags;
 
        ucp = uap->sigcntxp;
+       scp = (struct osigcontext *)ucp;
 
-       if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ))
-               return (EFAULT);
-       if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516)
-               return (osigreturn(p, (struct osigreturn_args *)uap));
+       if (useracc((caddr_t)scp, sizeof (struct osigcontext), VM_PROT_READ)) {
+               if (scp->sc_trapno == 0x01d516)
+                       return osigreturn(p, (struct osigreturn_args *)uap);
+       }
 
        /*
         * Since ucp is not an osigcontext but a ucontext_t, we have to


Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to