aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMarvin Borner2020-11-01 12:35:00 +0100
committerMarvin Borner2020-11-01 12:35:00 +0100
commitf40be8b5b6227775901a99946779661d0b4439e6 (patch)
tree34c28f138f4167de258ee18db44707aa4637a68d /kernel
parente0d3b1671b3f94657d70223b51285ed287c882df (diff)
Added files demo and needed functions
Diffstat (limited to 'kernel')
-rw-r--r--kernel/features/fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/features/fs.c b/kernel/features/fs.c
index c52a7b6..ceb345d 100644
--- a/kernel/features/fs.c
+++ b/kernel/features/fs.c
@@ -151,7 +151,8 @@ int find_inode(const char *name, int dir_inode)
do {
// Calculate the 4byte aligned size of each entry
sum += d->total_len;
- if (strncmp((void *)d->name, name, d->name_len) == 0) {
+ if (strlen(name) == d->name_len &&
+ strncmp((void *)d->name, name, d->name_len) == 0) {
free(buf);
return d->inode_num;
}