forked from Mirrors/freeswitch
don't deref NULL. Found by Klockwork (www.klocwork.com)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8482 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
99118bb2c6
commit
05b9c163ed
@ -901,12 +901,14 @@ SWITCH_STANDARD_APP(event_function)
|
||||
|
||||
for (x = 0; x < argc; x++) {
|
||||
char *p, *this = argv[x];
|
||||
p = this;
|
||||
while(*p == ' ') *p++ = '\0';
|
||||
this = p;
|
||||
|
||||
if (this) {
|
||||
char *var = this, *val = NULL;
|
||||
char *var, *val;
|
||||
p = this;
|
||||
while(*p == ' ') *p++ = '\0';
|
||||
this = p;
|
||||
|
||||
var = this;
|
||||
val = NULL;
|
||||
if ((val = strchr(var, '='))) {
|
||||
p = val - 1;
|
||||
*val++ = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user