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 2002/05/25 07:48:34 UTC
DO NOT REPLY [Bug 9410] New: -
Broken registry.c
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9410>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9410
Broken registry.c
Summary: Broken registry.c
Product: Apache httpd-2.0
Version: 2.0.36
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: Other
Component: mpm_winnt
AssignedTo: bugs@httpd.apache.org
ReportedBy: vasiliy@gazooc.com
Service failing to read parameters supplied through
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2\ImagePath
registry key.
Problem is in registry.c file, method ap_registry_get_array. It used to read
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2
\Parameters\ConfigArgs value, which in my case is empty. But original
implementation failing to recognize empty array and is returning array with
one empty element. This empty element is inserted into argument list before
user arguments during arguments rewriting. Becouse of that user arguments are
getting ignored.
Here is simple patch:
--- registry-old.c Fri May 17 11:11:40 2002
+++ registry.c Sat May 25 05:21:54 2002
@@ -266,26 +266,21 @@
pValue, /* for value */
&nSize); /* for size of "value" */
- nSize = 1; /* Element Count */
- tmp = pValue;
- while (tmp[0] || tmp[1])
- {
- if (!tmp[0])
- ++nSize;
- ++tmp;
+ nSize = 0; /* Element Count */
+ for (tmp = pValue; *tmp; ++tmp) {
+ ++nSize;
+ while (*tmp) {
+ ++tmp;
+ }
}
-
+
*parray = apr_array_make(p, nSize, sizeof(char *));
- tmp = pValue;
- newelem = (char **) apr_array_push(*parray);
- *newelem = tmp;
- while (tmp[0] || tmp[1])
- {
- if (!tmp[0]) {
- newelem = (char **) apr_array_push(*parray);
- *newelem = tmp + 1;
+ for (tmp = pValue; *tmp; ++tmp) {
+ newelem = (char **) apr_array_push(*parray);
+ *newelem = tmp;
+ while (*tmp) {
+ ++tmp;
}
- ++tmp;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org