]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
check to avoid potential seg
authorMichael Jerris <mike@jerris.com>
Tue, 11 Dec 2007 10:47:46 +0000 (10:47 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 11 Dec 2007 10:47:46 +0000 (10:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6633 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_utils.h

index 5025ce2114537fd0d07c2d2780cc94b5a49e18f7..ebad8afc6676c22d3afbbb49ff4855153d19dffd 100644 (file)
@@ -216,6 +216,10 @@ static inline switch_bool_t switch_strstr(char *s, char *q)
        char *p, *S = NULL, *Q = NULL;
        switch_bool_t tf = SWITCH_FALSE;
 
+       if (!s || !q) {
+               return SWITCH_FALSE;
+       }
+
        if (strstr(s, q)) {
                return SWITCH_TRUE;
        }