diff options
author | dzwdz | 2022-07-27 12:27:48 +0200 |
---|---|---|
committer | dzwdz | 2022-07-27 12:27:48 +0200 |
commit | 55b3a04e97b7ddd0db17a4fc3ba35461b106b92f (patch) | |
tree | ef05f83045eee6628385daa46ef7f15d5ff48032 /src/user/lib/elfload.c | |
parent | 734da5ae528b1e61e9701d70bfe7034a20bb61f2 (diff) |
user/libc: fseek()
Diffstat (limited to 'src/user/lib/elfload.c')
-rw-r--r-- | src/user/lib/elfload.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/user/lib/elfload.c b/src/user/lib/elfload.c index a471513..5ba596f 100644 --- a/src/user/lib/elfload.c +++ b/src/user/lib/elfload.c @@ -12,9 +12,9 @@ void elf_execf(FILE *f) { const size_t cap = 0x60000; size_t pos = 0; void *buf = malloc(cap); // TODO a way to get file size + fseek(f, 0, SEEK_SET); if (buf && fread(buf, 1, cap - pos, f)) elf_exec(buf); - free(buf); } |