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
33b8dfb9
Commit
33b8dfb9
authored
Jan 11, 2012
by
Nikias Bassen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compiler warnings
parent
83fa6982
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
13 deletions
+4
-13
base64.c
src/base64.c
+3
-3
bplist.c
src/bplist.c
+0
-8
hashtable.c
src/hashtable.c
+0
-1
xplist.c
src/xplist.c
+1
-1
No files found.
src/base64.c
View file @
33b8dfb9
...
...
@@ -104,9 +104,9 @@ static int base64decode_block(unsigned char *target, const char *data, size_t da
unsigned
char
*
base64decode
(
const
char
*
buf
,
size_t
*
size
)
{
if
(
!
buf
)
return
;
if
(
!
buf
)
return
NULL
;
size_t
len
=
strlen
(
buf
);
if
(
len
<=
0
)
return
;
if
(
len
<=
0
)
return
NULL
;
unsigned
char
*
outbuf
=
(
unsigned
char
*
)
malloc
((
len
/
4
)
*
3
+
3
);
unsigned
char
*
line
;
...
...
@@ -114,7 +114,7 @@ unsigned char *base64decode(const char *buf, size_t *size)
line
=
(
unsigned
char
*
)
strtok
((
char
*
)
buf
,
"
\r\n\t
"
);
while
(
line
)
{
p
+=
base64decode_block
(
outbuf
+
p
,
line
,
strlen
((
char
*
)
line
));
p
+=
base64decode_block
(
outbuf
+
p
,
(
const
char
*
)
line
,
strlen
((
char
*
)
line
));
// get next line of base64 encoded block
line
=
(
unsigned
char
*
)
strtok
(
NULL
,
"
\r\n\t
"
);
...
...
src/bplist.c
View file @
33b8dfb9
...
...
@@ -740,12 +740,6 @@ static void serialize_plist(node_t* node, void* data)
return
;
}
static
int
free_index
(
void
*
key
,
void
*
value
,
void
*
user_data
)
{
free
((
uint64_t
*
)
value
);
return
TRUE
;
}
#define Log2(x) (x == 8 ? 3 : (x == 4 ? 2 : (x == 2 ? 1 : 0)))
static
void
write_int
(
bytearray_t
*
bplist
,
uint64_t
val
)
...
...
@@ -998,7 +992,6 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length)
uint8_t
trailer
[
BPLIST_TRL_SIZE
];
//for string
long
len
=
0
;
int
type
=
0
;
long
items_read
=
0
;
long
items_written
=
0
;
uint16_t
*
unicodestr
=
NULL
;
...
...
@@ -1087,7 +1080,6 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length)
}
//free intermediate objects
//hash_table_foreach_remove(ref_table, free_index, NULL);
ptr_array_free
(
objects
);
hash_table_destroy
(
ref_table
);
...
...
src/hashtable.c
View file @
33b8dfb9
...
...
@@ -55,7 +55,6 @@ void hash_table_destroy(hashtable_t *ht)
void
hash_table_insert
(
hashtable_t
*
ht
,
void
*
key
,
void
*
value
)
{
if
(
!
ht
||
!
key
)
return
;
int
i
;
unsigned
int
hash
=
ht
->
hash_func
(
key
);
...
...
src/xplist.c
View file @
33b8dfb9
...
...
@@ -342,7 +342,7 @@ static void xml_to_node(xmlNodePtr xml_node, plist_t * plist_node)
{
xmlChar
*
strval
=
xmlNodeGetContent
(
node
);
time_t
time
=
0
;
if
(
strlen
(
strval
)
>=
11
)
{
if
(
strlen
(
(
const
char
*
)
strval
)
>=
11
)
{
struct
tm
btime
;
parse_date
((
const
char
*
)
strval
,
&
btime
);
time
=
mktime
(
&
btime
);
...
...
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