mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-03 20:00:26 +00:00
FS-3194 see comitted patch. I made the function assert rather than tolerate NULL and fixed the imporper usage.
This commit is contained in:
parent
7bee6d3d77
commit
484a397d88
@ -151,7 +151,11 @@ static inline char *switch_strchr_strict(const char *in, char find, const char *
|
|||||||
#endif
|
#endif
|
||||||
static inline int switch_string_has_escaped_data(const char *in)
|
static inline int switch_string_has_escaped_data(const char *in)
|
||||||
{
|
{
|
||||||
const char *i = strchr(in, '\\');
|
const char *i;
|
||||||
|
|
||||||
|
switch_assert(in);
|
||||||
|
|
||||||
|
i = strchr(in, '\\');
|
||||||
|
|
||||||
while (i && *i == '\\') {
|
while (i && *i == '\\') {
|
||||||
i++;
|
i++;
|
||||||
|
@ -1565,6 +1565,10 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
|
|||||||
int nv = 0;
|
int nv = 0;
|
||||||
char *gvar = NULL;
|
char *gvar = NULL;
|
||||||
|
|
||||||
|
if (zstr(in)) {
|
||||||
|
return (char *) in;
|
||||||
|
}
|
||||||
|
|
||||||
nv = switch_string_var_check_const(in) || switch_string_has_escaped_data(in);
|
nv = switch_string_var_check_const(in) || switch_string_has_escaped_data(in);
|
||||||
|
|
||||||
if (!nv) {
|
if (!nv) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user