summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/systrace/intercept.c5
-rw-r--r--bin/systrace/systrace-translate.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/bin/systrace/intercept.c b/bin/systrace/intercept.c
index 453d0d46cc1..6208d87be70 100644
--- a/bin/systrace/intercept.c
+++ b/bin/systrace/intercept.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intercept.c,v 1.21 2002/08/01 20:16:45 provos Exp $ */
+/* $OpenBSD: intercept.c,v 1.22 2002/08/01 20:50:17 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -34,6 +34,7 @@
#include <sys/tree.h>
#include <sys/wait.h>
#include <sys/stat.h>
+#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
@@ -485,7 +486,7 @@ intercept_replace(int fd, pid_t pid, struct intercept_replace *repl)
char *
intercept_get_string(int fd, pid_t pid, void *addr)
{
- static char name[MAXPATHLEN];
+ static char name[_POSIX2_LINE_MAX];
int off = 0, done = 0;
do {
diff --git a/bin/systrace/systrace-translate.c b/bin/systrace/systrace-translate.c
index cd55acd8c3e..0d8fa961d77 100644
--- a/bin/systrace/systrace-translate.c
+++ b/bin/systrace/systrace-translate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace-translate.c,v 1.9 2002/07/30 06:07:06 itojun Exp $ */
+/* $OpenBSD: systrace-translate.c,v 1.10 2002/08/01 20:50:17 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -190,6 +190,7 @@ get_argv(struct intercept_translate *trans, int fd, pid_t pid, void *addr)
int i, off = 0, len;
extern struct intercept_system intercept;
+ i = 0;
buf[0] = '\0';
while (1) {
if (intercept.io(fd, pid, INTERCEPT_READ, (char *)addr + off,
@@ -209,6 +210,7 @@ get_argv(struct intercept_translate *trans, int fd, pid_t pid, void *addr)
strlcat(buf, p, sizeof(buf));
off += sizeof(char *);
+ i++;
}
len = strlen(buf) + 1;