Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/external/cddl/osnet/dev/systrace



On Mar 10,  7:58pm, ozaki-r%netbsd.org@localhost (Ryota Ozaki) wrote:
-- Subject: Re: CVS commit: src/external/cddl/osnet/dev/systrace

| On Sun, Mar 8, 2015 at 2:47 AM, Christos Zoulas <christos%netbsd.org@localhost> wrote:
| > Module Name:    src
| > Committed By:   christos
| > Date:           Sat Mar  7 17:47:09 UTC 2015
| >
| > Modified Files:
| >         src/external/cddl/osnet/dev/systrace: systrace.c
| >
| > Log Message:
| > we have space for 2 more arguments so use it.
| >
| >
| > To generate a diff of this commit:
| > cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dev/systrace/systrace.c
| >
| > Please note that diffs are not public domain; they are subject to the
| > copyright notices on the relevant files.
| >
| 
| 
| diff --git a/external/cddl/osnet/dev/systrace/systrace.c
| b/external/cddl/osnet/dev/systrace/systrace.c
| index 7d2d328..50539ec 100644
| --- a/external/cddl/osnet/dev/systrace/systrace.c
| +++ b/external/cddl/osnet/dev/systrace/systrace.c
| @@ -1,4 +1,4 @@
| -/*     $NetBSD: systrace.c,v 1.5 2015/03/07 15:14:09 christos Exp $    */
| +/*     $NetBSD: systrace.c,v 1.6 2015/03/07 17:47:09 christos Exp $    */
| 
|  /*
|   * CDDL HEADER START
| @@ -139,17 +139,18 @@ systrace_probe(uint32_t id, register_t sysnum,
| const struct sysent *se,
|      const void *params, const register_t *ret, int error)
|  {
|         size_t          n_args  = 0;
| -       uintptr_t       uargs[SYS_MAXSYSARGS];
| +       uintptr_t       uargs[SYS_MAXSYSARGS + 3];
| 
|         memset(uargs, 0, sizeof(uargs));
| -       if (params) {
| +       if (ret) {
|                 /* entry syscall, convert params */
|                 systrace_args(sysnum, params, uargs, &n_args);
|         } else {
| -               /* return syscall, set values (XXX: errno?) */
| +               /* return syscall, set values and params: */
|                 uargs[0] = ret[0];
| 
| When ret == NULL, it dies here with NULL pointer access...

The test is backwards...

christos


Home | Main Index | Thread Index | Old Index