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
135e43c1
Commit
135e43c1
authored
Dec 13, 2008
by
Jonathan Beck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sanity check on indexes when building plist tree.
parent
2a514976
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
bplist.c
src/bplist.c
+19
-14
plist.c
src/plist.c
+1
-1
No files found.
src/bplist.c
View file @
135e43c1
...
...
@@ -408,16 +408,20 @@ void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist)
//first one is actually a key
plist_get_data
(
nodeslist
[
index1
])
->
type
=
PLIST_KEY
;
if
(
index1
>=
0
&&
index1
<
num_objects
)
{
if
(
G_NODE_IS_ROOT
(
nodeslist
[
index1
]))
g_node_append
(
nodeslist
[
i
],
nodeslist
[
index1
]);
else
g_node_append
(
nodeslist
[
i
],
g_node_copy_deep
(
nodeslist
[
index1
],
copy_plist_data
,
NULL
));
}
if
(
index2
>=
0
&&
index2
<
num_objects
)
{
if
(
G_NODE_IS_ROOT
(
nodeslist
[
index2
]))
g_node_append
(
nodeslist
[
i
],
nodeslist
[
index2
]);
else
g_node_append
(
nodeslist
[
i
],
g_node_copy_deep
(
nodeslist
[
index2
],
copy_plist_data
,
NULL
));
}
}
free
(
data
->
buff
);
break
;
...
...
@@ -428,12 +432,13 @@ void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist)
str_j
=
j
*
dict_param_size
;
index1
=
swap_n_bytes
(
data
->
buff
+
str_j
,
dict_param_size
);
//g_node_append(nodeslist[i], nodeslist[index1]);
if
(
index1
>=
0
&&
index1
<
num_objects
)
{
if
(
G_NODE_IS_ROOT
(
nodeslist
[
index1
]))
g_node_append
(
nodeslist
[
i
],
nodeslist
[
index1
]);
else
g_node_append
(
nodeslist
[
i
],
g_node_copy_deep
(
nodeslist
[
index1
],
copy_plist_data
,
NULL
));
}
}
free
(
data
->
buff
);
break
;
default:
...
...
src/plist.c
View file @
135e43c1
...
...
@@ -157,7 +157,7 @@ char compare_node_value(plist_type type, plist_data_t data, void *value, uint64_
res
=
!
wcscmp
(
data
->
unicodeval
,
((
wchar_t
*
)
value
));
break
;
case
PLIST_DATA
:
res
=
memcmp
(
data
->
buff
,
(
char
*
)
value
,
length
);
res
=
memcmp
(
data
->
buff
,
(
char
*
)
value
,
length
);
break
;
case
PLIST_ARRAY
:
case
PLIST_DICT
:
...
...
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