Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
2e424342
Commit
2e424342
authored
Jan 19, 2016
by
Simon Morlat
Browse files
prevent crash when call log has invalid URIso
parent
0d5ffa50
Changes
1
Hide whitespace changes
Inline
Side-by-side
coreapi/call_log.c
View file @
2e424342
...
...
@@ -423,6 +423,9 @@ static int create_call_log(void *data, int argc, char **argv, char **colName) {
unsigned
int
storage_id
=
atoi
(
argv
[
0
]);
from
=
linphone_address_new
(
argv
[
1
]);
to
=
linphone_address_new
(
argv
[
2
]);
if
(
from
==
NULL
||
to
==
NULL
)
goto
error
;
dir
=
(
LinphoneCallDir
)
atoi
(
argv
[
3
]);
log
=
linphone_call_log_new
(
dir
,
from
,
to
);
...
...
@@ -445,7 +448,16 @@ static int create_call_log(void *data, int argc, char **argv, char **colName) {
}
*
list
=
ms_list_append
(
*
list
,
log
);
return
0
;
error:
if
(
from
){
linphone_address_destroy
(
from
);
}
if
(
to
){
linphone_address_destroy
(
to
);
}
ms_error
(
"Bad call log at storage_id %u"
,
storage_id
);
return
0
;
}
...
...
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