diff options
author | 2007-05-15 19:42:46 +0000 | |
---|---|---|
committer | 2007-05-15 19:42:46 +0000 | |
commit | 82b5fa73caf8eb4894fd4bb0a717cd311c973b2d (patch) | |
tree | 686670cb0a9ae154645ac05dea3d98dacbca0f52 | |
parent | Remove useless NOxxx defines and use NULL instead. (diff) | |
download | wireguard-openbsd-82b5fa73caf8eb4894fd4bb0a717cd311c973b2d.tar.xz wireguard-openbsd-82b5fa73caf8eb4894fd4bb0a717cd311c973b2d.zip |
don't assume 4-byte aligned memory when intercepting a string
this should get rid of
systrace: intercept_get_string: ioctl: Invalid argument
no objections from provos, ok otto
-rw-r--r-- | bin/systrace/intercept.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/systrace/intercept.c b/bin/systrace/intercept.c index 1281f5ea45b..22def712e83 100644 --- a/bin/systrace/intercept.c +++ b/bin/systrace/intercept.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intercept.c,v 1.53 2006/09/19 10:48:41 otto Exp $ */ +/* $OpenBSD: intercept.c,v 1.54 2007/05/15 19:42:46 sturm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -560,7 +560,7 @@ intercept_get_string(int fd, pid_t pid, void *addr) /* Did the current system call get interrupted? */ if (errno == EBUSY) return (NULL); - if (errno != EINVAL || stride == 4) { + if (errno != EINVAL || stride == 1) { warn("%s: ioctl", __func__); return (NULL); } |