#3 nsd/fastpath.c:237: error: Null Dereference pointer `servPtr->fastpath.serverdir` last assigned on line 236 could be null and is dereferenced by call to `Ns_PathIsAbsolute()` at line 237, column 14. nsd/fastpath.c:213:1: start of procedure ConfigServerFastpath() 211. *---------------------------------------------------------------------- 212. */ 213. static Ns_ReturnCode ^ 214. ConfigServerFastpath(const char *server) 215. { nsd/fastpath.c:216:5: 214. ConfigServerFastpath(const char *server) 215. { 216. NsServer *servPtr = NsGetServer(server); ^ 217. Ns_ReturnCode result; 218. nsd/server.c:82:1: start of procedure NsGetServer() 80. */ 81. 82. NsServer * ^ 83. NsGetServer(const char *server) 84. { nsd/server.c:85:5: 83. NsGetServer(const char *server) 84. { 85. NsServer *result = NULL; ^ 86. 87. if (server != NULL) { nsd/server.c:87:9: Taking true branch 85. NsServer *result = NULL; 86. 87. if (server != NULL) { ^ 88. const Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&nsconf.servertable, server); 89. nsd/server.c:88:9: Skipping __function_pointer__(): unresolved function pointer 86. 87. if (server != NULL) { 88. const Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&nsconf.servertable, server); ^ 89. 90. if (hPtr != NULL) { nsd/server.c:90:13: Taking true branch 88. const Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&nsconf.servertable, server); 89. 90. if (hPtr != NULL) { ^ 91. result = Tcl_GetHashValue(hPtr); 92. } nsd/server.c:91:13: 89. 90. if (hPtr != NULL) { 91. result = Tcl_GetHashValue(hPtr); ^ 92. } 93. } nsd/server.c:95:5: 93. } 94. 95. return result; ^ 96. } 97. nsd/server.c:96:1: return from a call to NsGetServer 94. 95. return result; 96. } ^ 97. 98. nsd/fastpath.c:219:9: Condition is false 217. Ns_ReturnCode result; 218. 219. if (unlikely(servPtr == NULL)) { ^ 220. Ns_Log(Warning, "Could configure fastpath; server '%s' unknown", server); 221. result = NS_ERROR; nsd/fastpath.c:219:9: Taking false branch 217. Ns_ReturnCode result; 218. 219. if (unlikely(servPtr == NULL)) { ^ 220. Ns_Log(Warning, "Could configure fastpath; server '%s' unknown", server); 221. result = NS_ERROR; nsd/fastpath.c:227:9: 225. const char *path, *p; 226. 227. path = Ns_ConfigSectionPath(NULL, server, NULL, "fastpath", (char *)0L); ^ 228. Ns_DStringInit(&ds); 229. nsd/config.c:815:1: start of procedure Ns_ConfigSectionPath() 813. *---------------------------------------------------------------------- 814. */ 815. const char * ^ 816. Ns_ConfigSectionPath(Ns_Set **setPtr, const char *server, const char *module, ...) 817. { nsd/config.c:822:5: Skipping Tcl_DStringInit(): method has no implementation 820. Section *sectionPtr; 821. 822. Tcl_DStringInit(&ds); ^ 823. va_start(ap, module); 824. PathAppend(&ds, server, module, ap); nsd/config.c:823:5: 821. 822. Tcl_DStringInit(&ds); 823. va_start(ap, module); ^ 824. PathAppend(&ds, server, module, ap); 825. va_end(ap); nsd/config.c:824:5: Skipping PathAppend(): empty list of specs 822. Tcl_DStringInit(&ds); 823. va_start(ap, module); 824. PathAppend(&ds, server, module, ap); ^ 825. va_end(ap); 826. nsd/config.c:825:5: 823. va_start(ap, module); 824. PathAppend(&ds, server, module, ap); 825. va_end(ap); ^ 826. 827. Ns_Log(Dev, "config section: %s", ds.string); nsd/config.c:827:5: 825. va_end(ap); 826. 827. Ns_Log(Dev, "config section: %s", ds.string); ^ 828. sectionPtr = GetSection(ds.string, NS_TRUE); 829. nsd/log.c:716:1: start of procedure Ns_Log() 714. */ 715. 716. void ^ 717. Ns_Log(Ns_LogSeverity severity, const char *fmt, ...) 718. { nsd/log.c:721:5: 719. va_list ap; 720. 721. NS_NONNULL_ASSERT(fmt != NULL); ^ 722. 723. va_start(ap, fmt); nsd/log.c:723:5: 721. NS_NONNULL_ASSERT(fmt != NULL); 722. 723. va_start(ap, fmt); ^ 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); nsd/log.c:724:5: Skipping Ns_VALog(): empty list of specs 722. 723. va_start(ap, fmt); 724. Ns_VALog(severity, fmt, ap); ^ 725. va_end(ap); 726. } nsd/log.c:725:5: 723. va_start(ap, fmt); 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); ^ 726. } 727. nsd/log.c:726:1: return from a call to Ns_Log 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); 726. } ^ 727. 728. nsd/config.c:828:5: Skipping GetSection(): empty list of specs 826. 827. Ns_Log(Dev, "config section: %s", ds.string); 828. sectionPtr = GetSection(ds.string, NS_TRUE); ^ 829. 830. Tcl_DStringFree(&ds); nsd/config.c:830:5: Skipping Tcl_DStringFree(): method has no implementation 828. sectionPtr = GetSection(ds.string, NS_TRUE); 829. 830. Tcl_DStringFree(&ds); ^ 831. 832. if (setPtr != NULL) { nsd/config.c:832:9: Taking false branch 830. Tcl_DStringFree(&ds); 831. 832. if (setPtr != NULL) { ^ 833. *setPtr = sectionPtr->set; 834. } nsd/config.c:836:5: 834. } 835. 836. return Ns_SetName(sectionPtr->set); ^ 837. } 838. nsd/config.c:837:1: return from a call to Ns_ConfigSectionPath 835. 836. return Ns_SetName(sectionPtr->set); 837. } ^ 838. 839. nsd/fastpath.c:228:9: Skipping Tcl_DStringInit(): method has no implementation 226. 227. path = Ns_ConfigSectionPath(NULL, server, NULL, "fastpath", (char *)0L); 228. Ns_DStringInit(&ds); ^ 229. 230. p = Ns_ConfigString(path, "directoryfile", "index.adp index.tcl index.html index.htm"); nsd/fastpath.c:230:9: 228. Ns_DStringInit(&ds); 229. 230. p = Ns_ConfigString(path, "directoryfile", "index.adp index.tcl index.html index.htm"); ^ 231. if (p != NULL && Tcl_SplitList(NULL, p, &servPtr->fastpath.dirc, 232. &servPtr->fastpath.dirv) != TCL_OK) { nsd/config.c:105:1: start of procedure Ns_ConfigString() 103. */ 104. 105. const char * ^ 106. Ns_ConfigString(const char *section, const char *key, const char *defaultValue) 107. { nsd/config.c:110:5: 108. const char *value; 109. 110. NS_NONNULL_ASSERT(section != NULL); ^ 111. NS_NONNULL_ASSERT(key != NULL); 112. nsd/config.c:111:5: 109. 110. NS_NONNULL_ASSERT(section != NULL); 111. NS_NONNULL_ASSERT(key != NULL); ^ 112. 113. value = ConfigGet(section, key, NS_FALSE, defaultValue); nsd/config.c:113:5: Skipping ConfigGet(): empty list of specs 111. NS_NONNULL_ASSERT(key != NULL); 112. 113. value = ConfigGet(section, key, NS_FALSE, defaultValue); ^ 114. Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", 115. section, key, nsd/config.c:116:13: Condition is true 114. Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, ^ 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. nsd/config.c:116:12: 114. Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, ^ 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. nsd/config.c:117:13: Condition is true 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); ^ 118. 119. return (value != NULL) ? value : defaultValue; nsd/config.c:117:12: 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); ^ 118. 119. return (value != NULL) ? value : defaultValue; nsd/config.c:114:5: 112. 113. value = ConfigGet(section, key, NS_FALSE, defaultValue); 114. Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", ^ 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, nsd/log.c:716:1: start of procedure Ns_Log() 714. */ 715. 716. void ^ 717. Ns_Log(Ns_LogSeverity severity, const char *fmt, ...) 718. { nsd/log.c:721:5: 719. va_list ap; 720. 721. NS_NONNULL_ASSERT(fmt != NULL); ^ 722. 723. va_start(ap, fmt); nsd/log.c:723:5: 721. NS_NONNULL_ASSERT(fmt != NULL); 722. 723. va_start(ap, fmt); ^ 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); nsd/log.c:724:5: Skipping Ns_VALog(): empty list of specs 722. 723. va_start(ap, fmt); 724. Ns_VALog(severity, fmt, ap); ^ 725. va_end(ap); 726. } nsd/log.c:725:5: 723. va_start(ap, fmt); 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); ^ 726. } 727. nsd/log.c:726:1: return from a call to Ns_Log 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); 726. } ^ 727. 728. nsd/config.c:119:13: Condition is true 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. 119. return (value != NULL) ? value : defaultValue; ^ 120. } 121. nsd/config.c:119:12: 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. 119. return (value != NULL) ? value : defaultValue; ^ 120. } 121. nsd/config.c:119:5: 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. 119. return (value != NULL) ? value : defaultValue; ^ 120. } 121. nsd/config.c:120:1: return from a call to Ns_ConfigString 118. 119. return (value != NULL) ? value : defaultValue; 120. } ^ 121. 122. nsd/fastpath.c:231:13: Taking true branch 229. 230. p = Ns_ConfigString(path, "directoryfile", "index.adp index.tcl index.html index.htm"); 231. if (p != NULL && Tcl_SplitList(NULL, p, &servPtr->fastpath.dirc, ^ 232. &servPtr->fastpath.dirv) != TCL_OK) { 233. Ns_Log(Error, "fastpath[%s]: directoryfile is not a list: %s", server, p); nsd/fastpath.c:231:26: Taking true branch 229. 230. p = Ns_ConfigString(path, "directoryfile", "index.adp index.tcl index.html index.htm"); 231. if (p != NULL && Tcl_SplitList(NULL, p, &servPtr->fastpath.dirc, ^ 232. &servPtr->fastpath.dirv) != TCL_OK) { 233. Ns_Log(Error, "fastpath[%s]: directoryfile is not a list: %s", server, p); nsd/fastpath.c:233:13: 231. if (p != NULL && Tcl_SplitList(NULL, p, &servPtr->fastpath.dirc, 232. &servPtr->fastpath.dirv) != TCL_OK) { 233. Ns_Log(Error, "fastpath[%s]: directoryfile is not a list: %s", server, p); ^ 234. } 235. nsd/log.c:716:1: start of procedure Ns_Log() 714. */ 715. 716. void ^ 717. Ns_Log(Ns_LogSeverity severity, const char *fmt, ...) 718. { nsd/log.c:721:5: 719. va_list ap; 720. 721. NS_NONNULL_ASSERT(fmt != NULL); ^ 722. 723. va_start(ap, fmt); nsd/log.c:723:5: 721. NS_NONNULL_ASSERT(fmt != NULL); 722. 723. va_start(ap, fmt); ^ 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); nsd/log.c:724:5: Skipping Ns_VALog(): empty list of specs 722. 723. va_start(ap, fmt); 724. Ns_VALog(severity, fmt, ap); ^ 725. va_end(ap); 726. } nsd/log.c:725:5: 723. va_start(ap, fmt); 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); ^ 726. } 727. nsd/log.c:726:1: return from a call to Ns_Log 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); 726. } ^ 727. 728. nsd/fastpath.c:236:9: 234. } 235. 236. servPtr->fastpath.serverdir = Ns_ConfigString(path, "serverdir", NS_EMPTY_STRING); ^ 237. if (!Ns_PathIsAbsolute(servPtr->fastpath.serverdir)) { 238. (void)Ns_HomePath(&ds, servPtr->fastpath.serverdir, (char *)0L); nsd/config.c:105:1: start of procedure Ns_ConfigString() 103. */ 104. 105. const char * ^ 106. Ns_ConfigString(const char *section, const char *key, const char *defaultValue) 107. { nsd/config.c:110:5: 108. const char *value; 109. 110. NS_NONNULL_ASSERT(section != NULL); ^ 111. NS_NONNULL_ASSERT(key != NULL); 112. nsd/config.c:111:5: 109. 110. NS_NONNULL_ASSERT(section != NULL); 111. NS_NONNULL_ASSERT(key != NULL); ^ 112. 113. value = ConfigGet(section, key, NS_FALSE, defaultValue); nsd/config.c:113:5: Skipping ConfigGet(): empty list of specs 111. NS_NONNULL_ASSERT(key != NULL); 112. 113. value = ConfigGet(section, key, NS_FALSE, defaultValue); ^ 114. Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", 115. section, key, nsd/config.c:116:13: Condition is false 114. Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, ^ 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. nsd/config.c:116:12: 114. Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, ^ 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. nsd/config.c:117:13: Condition is false 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); ^ 118. 119. return (value != NULL) ? value : defaultValue; nsd/config.c:117:12: 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); ^ 118. 119. return (value != NULL) ? value : defaultValue; nsd/config.c:114:5: 112. 113. value = ConfigGet(section, key, NS_FALSE, defaultValue); 114. Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", ^ 115. section, key, 116. (value != NULL) ? value : NS_EMPTY_STRING, nsd/log.c:716:1: start of procedure Ns_Log() 714. */ 715. 716. void ^ 717. Ns_Log(Ns_LogSeverity severity, const char *fmt, ...) 718. { nsd/log.c:721:5: 719. va_list ap; 720. 721. NS_NONNULL_ASSERT(fmt != NULL); ^ 722. 723. va_start(ap, fmt); nsd/log.c:723:5: 721. NS_NONNULL_ASSERT(fmt != NULL); 722. 723. va_start(ap, fmt); ^ 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); nsd/log.c:724:5: Skipping Ns_VALog(): empty list of specs 722. 723. va_start(ap, fmt); 724. Ns_VALog(severity, fmt, ap); ^ 725. va_end(ap); 726. } nsd/log.c:725:5: 723. va_start(ap, fmt); 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); ^ 726. } 727. nsd/log.c:726:1: return from a call to Ns_Log 724. Ns_VALog(severity, fmt, ap); 725. va_end(ap); 726. } ^ 727. 728. nsd/config.c:119:13: Condition is false 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. 119. return (value != NULL) ? value : defaultValue; ^ 120. } 121. nsd/config.c:119:12: 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. 119. return (value != NULL) ? value : defaultValue; ^ 120. } 121. nsd/config.c:119:5: 117. (defaultValue != NULL) ? defaultValue : NS_EMPTY_STRING); 118. 119. return (value != NULL) ? value : defaultValue; ^ 120. } 121. nsd/config.c:120:1: return from a call to Ns_ConfigString 118. 119. return (value != NULL) ? value : defaultValue; 120. } ^ 121. 122. nsd/fastpath.c:237:14: 235. 236. servPtr->fastpath.serverdir = Ns_ConfigString(path, "serverdir", NS_EMPTY_STRING); 237. if (!Ns_PathIsAbsolute(servPtr->fastpath.serverdir)) { ^ 238. (void)Ns_HomePath(&ds, servPtr->fastpath.serverdir, (char *)0L); 239. servPtr->fastpath.serverdir = Ns_DStringExport(&ds); nsd/pathname.c:154:1: start of procedure Ns_PathIsAbsolute() 152. */ 153. 154. bool ^ 155. Ns_PathIsAbsolute(const char *path) 156. { nsd/pathname.c:157:5: 155. Ns_PathIsAbsolute(const char *path) 156. { 157. NS_NONNULL_ASSERT(path != NULL); ^ 158. 159. #ifdef _WIN32 nsd/pathname.c:164:13: 162. } 163. #endif 164. return (ISSLASH(*path)); ^ 165. } 166.