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
ff4fc77a
Commit
ff4fc77a
authored
Jun 04, 2020
by
Martin Szulecki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace tabs with correct space indentation in plistutil.c
parent
319de9a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
plistutil.c
tools/plistutil.c
+10
-10
No files found.
tools/plistutil.c
View file @
ff4fc77a
...
...
@@ -143,17 +143,17 @@ int main(int argc, char *argv[])
if
(
!
options
->
in_file
||
!
strcmp
(
options
->
in_file
,
"-"
))
{
read_size
=
0
;
read_size
=
0
;
plist_entire
=
malloc
(
sizeof
(
char
)
*
BUF_SIZE
);
if
(
plist_entire
==
NULL
)
{
printf
(
"ERROR: Failed to allocate buffer to read from stdin"
);
free
(
options
);
free
(
options
);
return
1
;
}
plist_entire
[
read_size
]
=
'\0'
;
plist_entire
[
read_size
]
=
'\0'
;
char
ch
;
while
(
read
(
STDIN_FILENO
,
&
ch
,
1
)
>
0
)
while
(
read
(
STDIN_FILENO
,
&
ch
,
1
)
>
0
)
{
if
(
read_size
>=
BUF_SIZE
)
{
char
*
old
=
plist_entire
;
...
...
@@ -171,7 +171,7 @@ int main(int argc, char *argv[])
}
plist_entire
[
read_size
]
=
'\0'
;
// Not positive we need this, but it doesnt seem to hurt lol
// Not positive we need this, but it doesnt seem to hurt lol
if
(
ferror
(
stdin
))
{
printf
(
"ERROR: reading from stdin.
\n
"
);
...
...
@@ -182,15 +182,15 @@ int main(int argc, char *argv[])
if
(
read_size
<
8
)
{
printf
(
"ERROR: Input file is too small to contain valid plist data.
\n
"
);
free
(
plist_entire
);
free
(
plist_entire
);
free
(
options
);
return
1
;
}
return
1
;
}
}
else
{
// read input file
iplist
=
fopen
(
options
->
in_file
,
"rb"
);
// read input file
iplist
=
fopen
(
options
->
in_file
,
"rb"
);
if
(
!
iplist
)
{
printf
(
"ERROR: Could not open input file '%s': %s
\n
"
,
options
->
in_file
,
strerror
(
errno
));
free
(
options
);
...
...
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