You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2010/07/21 23:32:56 UTC
DO NOT REPLY [Bug 49634] New: Possible segfault in core/server.c
https://issues.apache.org/bugzilla/show_bug.cgi?id=49634
Summary: Possible segfault in core/server.c
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: bugs@httpd.apache.org
ReportedBy: tom.care@uqconnect.edu.au
Hi all,
I am a contributor to the open source project Clang, which functions as a C
front-end and static analyzer for the LLVM compiler. You can read more about it
at http://clang.llvm.org. I am currently writing some static analysis checks,
and one check has flagged a possible segfault and unreachable code in
core/server.c.
The function in question is dirsection (line 1785 in trunk).
1805: arg = apr_pstrndup(cmd->pool, arg, endp - arg);
1806:
1807: if (!arg[0]) {
1808: return missing_container_arg(cmd);
1809: }
1810:
1811: if (!arg) {
1812: if (thiscmd->cmd_data)
1813: return "<DirectoryMatch > block must specify a path";
1814: else
1815: return "<Directory > block must specify a path";
1816: }
The analyzer flags lines 1812-1815 as unreachable. We can see that on line
1807, arg is dereferenced without a null check. At line 1811, arg cannot be
null, so the condition is never satisfied. It seems that the author intended
the checks to be in the reverse order.
Tom
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49634] Possible segfault in core/server.c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49634
Stefan Fritsch <sf...@sfritsch.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Stefan Fritsch <sf...@sfritsch.de> 2010-08-18 16:11:42 EDT ---
fixed in r986901
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49634] Possible segfault in core/server.c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49634
Tom Care <to...@uqconnect.edu.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tom.care@uqconnect.edu.au
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org