From: Stefan Fritsch Date: Sat, 8 Oct 2011 07:44:10 +0000 (+0000) Subject: Add another AP_DEBUG_ASSERT to document some assumptions in the code, X-Git-Tag: 2.3.15~161 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0886568494e301ac30571e9652ba694ac42e8889;p=apache Add another AP_DEBUG_ASSERT to document some assumptions in the code, for the benefit of code analyzers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180330 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c index e8a08cff05..3a88493750 100644 --- a/modules/ssl/ssl_util.c +++ b/modules/ssl/ssl_util.c @@ -125,6 +125,8 @@ BOOL ssl_util_path_check(ssl_pathcheck_t pcm, const char *path, apr_pool_t *p) if (pcm & SSL_PCM_EXISTS && apr_stat(&finfo, path, APR_FINFO_TYPE|APR_FINFO_SIZE, p) != 0) return FALSE; + AP_DEBUG_ASSERT((pcm & SSL_PCM_EXISTS) || + !(pcm & (SSL_PCM_ISREG|SSL_PCM_ISDIR|SSL_PCM_ISNONZERO))); if (pcm & SSL_PCM_ISREG && finfo.filetype != APR_REG) return FALSE; if (pcm & SSL_PCM_ISDIR && finfo.filetype != APR_DIR)