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
365e1199
Commit
365e1199
authored
Jul 09, 2009
by
Jonathan Beck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make copy_plist actually copy plists (previously always returning NULL).
parent
192f3350
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
plist.c
src/plist.c
+11
-5
No files found.
src/plist.c
View file @
365e1199
...
...
@@ -139,7 +139,7 @@ void plist_free(plist_t plist)
g_node_destroy
(
plist
);
}
static
void
plist_copy_node
(
GNode
*
node
,
gpointer
parent_node
)
static
void
plist_copy_node
(
GNode
*
node
,
gpointer
parent_node
_ptr
)
{
plist_t
newnode
=
NULL
;
plist_data_t
data
=
plist_get_data
(
node
);
...
...
@@ -150,15 +150,21 @@ static void plist_copy_node(GNode * node, gpointer parent_node)
memcpy
(
newdata
,
data
,
sizeof
(
struct
plist_data_s
));
newnode
=
plist_new_node
(
newdata
);
if
(
parent_node
)
{
g_node_append
(
parent_node
,
newnode
);
if
(
*
(
plist_t
*
)
parent_node_ptr
)
{
g_node_append
(
*
(
plist_t
*
)
parent_node_ptr
,
newnode
);
}
g_node_children_foreach
(
node
,
G_TRAVERSE_ALL
,
plist_copy_node
,
newnode
);
else
{
*
(
plist_t
*
)
parent_node_ptr
=
newnode
;
}
g_node_children_foreach
(
node
,
G_TRAVERSE_ALL
,
plist_copy_node
,
&
newnode
);
}
plist_t
plist_copy
(
plist_t
node
)
{
plist_copy_node
(
node
,
NULL
);
plist_t
copied
=
NULL
;
plist_copy_node
(
node
,
&
copied
);
return
copied
;
}
plist_t
plist_get_first_child
(
plist_t
node
)
...
...
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