mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 06:04:20 +00:00
FS-8537: Passing nil to various lua functions causes segfault
Various functions exposed via lua do not check their parameters for null causing freeswitch to segfault. This change adds checking for null parameters and returns an error instead of segfaulting.
This commit is contained in:
1 parent
de7a123c8b
commit
4e9977507d
4 files changed
+63
-18
No files matched your search
@@ -996,6 +996,11 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
|
||||
switch_bool_t rval = SWITCH_FALSE;
|
||||
const char *err = NULL;
|
||||
|
||||
if (zstr(to)) {
|
||||
err = "No to address specified";
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!zstr(file) && !zstr(convert_cmd) && !zstr(convert_ext)) {
|
||||
if ((ext = strrchr(file, '.'))) {
|
||||
dupfile = strdup(file);
|
||||
|
||||
Reference in new issue
Block a user