mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 10:26:41 +00:00
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++) {
|
for (x = 0; x < argc; x++) {
|
||||||
char *p, *this = argv[x];
|
char *p, *this = argv[x];
|
||||||
p = this;
|
|
||||||
while(*p == ' ') *p++ = '\0';
|
|
||||||
this = p;
|
|
||||||
|
|
||||||
if (this) {
|
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, '='))) {
|
if ((val = strchr(var, '='))) {
|
||||||
p = val - 1;
|
p = val - 1;
|
||||||
*val++ = '\0';
|
*val++ = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user