don't let negative system call codes in
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 21 Mar 1992 05:55:42 +0000 (21:55 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 21 Mar 1992 05:55:42 +0000 (21:55 -0800)
SCCS-vsn: sys/pmax/pmax/trap.c 7.4

usr/src/sys/pmax/pmax/trap.c

index 51519ca..857f67c 100644 (file)
@@ -11,7 +11,7 @@
  *
  * from: Utah $Hdr: trap.c 1.32 91/04/06$
  *
  *
  * from: Utah $Hdr: trap.c 1.32 91/04/06$
  *
- *     @(#)trap.c      7.3 (Berkeley) %G%
+ *     @(#)trap.c      7.4 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -422,7 +422,7 @@ trap(statusReg, causeReg, vadr, pc, args)
                                }
                        }
                } else {
                                }
                        }
                } else {
-                       if (code >= numsys)
+                       if ((u_int)code >= numsys)
                                callp = &systab[0];     /* indir (illegal) */
                        else
                                callp = &systab[code];
                                callp = &systab[0];     /* indir (illegal) */
                        else
                                callp = &systab[code];