Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
e87e41bb
Commit
e87e41bb
authored
Aug 20, 2008
by
JonathanBeck
Committed by
Jonathan Beck
Aug 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arrays of string are now NULL terminated, update for loop end condition.
free these arrays when needed.
parent
efe860d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ifuse.c
src/ifuse.c
+3
-2
No files found.
src/ifuse.c
View file @
e87e41bb
...
...
@@ -82,7 +82,7 @@ static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
if
(
!
dirs
)
return
-
ENOENT
;
for
(
i
=
0
;
strcmp
(
dirs
[
i
],
""
)
;
i
++
)
{
for
(
i
=
0
;
dirs
[
i
]
;
i
++
)
{
filler
(
buf
,
dirs
[
i
],
NULL
,
0
);
}
...
...
@@ -237,7 +237,7 @@ int ifuse_statfs(const char *path, struct statvfs *stats) {
if
(
!
info_raw
)
return
-
ENOENT
;
for
(
i
=
0
;
strcmp
(
info_raw
[
i
],
""
)
;
i
++
)
{
for
(
i
=
0
;
info_raw
[
i
]
;
i
++
)
{
if
(
!
strcmp
(
info_raw
[
i
],
"FSTotalBytes"
))
{
totalspace
=
atoi
(
info_raw
[
i
+
1
]);
}
else
if
(
!
strcmp
(
info_raw
[
i
],
"FSFreeBytes"
))
{
...
...
@@ -246,6 +246,7 @@ int ifuse_statfs(const char *path, struct statvfs *stats) {
blocksize
=
atoi
(
info_raw
[
i
+
1
]);
}
}
free_dictionary
(
info_raw
);
// Now to fill the struct.
stats
->
f_bsize
=
stats
->
f_frsize
=
blocksize
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment