summaryrefslogtreecommitdiff
path: root/src/user/app/find/find.c
diff options
context:
space:
mode:
authordzwdz2022-08-04 23:06:57 +0200
committerdzwdz2022-08-04 23:06:57 +0200
commitce00d1677d7a419b427e7f11963eee982a55a231 (patch)
tree2662c3861226f6909b83d57ff8b6ac3b2ba5ec8d /src/user/app/find/find.c
parent26dc784103914b9d6ba36e0a96fa4b3af977626f (diff)
do some simple TODOs, organize the rest; general code maintainance
Diffstat (limited to 'src/user/app/find/find.c')
-rw-r--r--src/user/app/find/find.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/user/app/find/find.c b/src/user/app/find/find.c
index 502a190..6c5d31a 100644
--- a/src/user/app/find/find.c
+++ b/src/user/app/find/find.c
@@ -1,3 +1,4 @@
+#include <camellia/path.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -48,8 +49,8 @@ void recurse(char *path) {
}
void find(const char *path) {
- // TODO export PATH_MAX
- char *buf = malloc(4096);
+ // TODO bound checking
+ char *buf = malloc(PATH_MAX);
memcpy(buf, path, strlen(path)+1);
recurse(buf);
free(buf);