summaryrefslogtreecommitdiff
path: root/sysfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysfile.c')
-rw-r--r--sysfile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysfile.c b/sysfile.c
index 9de3d86..64f2b33 100644
--- a/sysfile.c
+++ b/sysfile.c
@@ -1,3 +1,9 @@
+//
+// File-system system calls.
+// Mostly argument checking, since we don't trust
+// user code, and calls into file.c and fs.c.
+//
+
#include "types.h"
#include "defs.h"
#include "param.h"
@@ -382,13 +388,13 @@ sys_exec(void)
for(i=0;; i++){
if(i >= NELEM(argv))
return -1;
- if(fetchint(proc, uargv+4*i, (int*)&uarg) < 0)
+ if(fetchint(uargv+4*i, (int*)&uarg) < 0)
return -1;
if(uarg == 0){
argv[i] = 0;
break;
}
- if(fetchstr(proc, uarg, &argv[i]) < 0)
+ if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);