]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_apple_x509_tp/lib/certGroupUtils.cpp
Security-58286.260.20.tar.gz
[apple/security.git] / OSX / libsecurity_apple_x509_tp / lib / certGroupUtils.cpp
index 97700ebf0082e8e4b4764d844983e75a476c0906..dffa3c2a823c77289b75086d97a74208745fdde6 100644 (file)
@@ -300,6 +300,10 @@ static const char *tpSubStr(
        const char      *substr,
        uint32          substrLen)
 {
+    if(!bigstr || !substr || bigstrLen == 0 || substrLen == 0) {
+        return NULL;
+    }
+
        /* stop searching substrLen chars before end of bigstr */
        const char *endBigStr = bigstr + bigstrLen - substrLen;
        for( ; bigstr <= endBigStr; ) {
@@ -516,7 +520,6 @@ CSSM_BOOL tpCompareHostNames(
        } while(1);
        /* NOT REACHED */
        //assert(0):
-       return CSSM_FALSE;
 }
 
 /*