+2008-03-26 Helge Hess <helge.hess@opengroupware.org>
+
+ * handler.c: fixed a double free() crasher, as reported by Stephane
+
+ * NGBufferedDescriptor.c (NGBufferedDescriptor_read): fixed a
+ potential crasher, discovered by Stephane
+
2007-07-19 Wolfgang Sourdeau <WSourdeau@Inverse.CA>
* GNUmakefile: include APR CFLAGS and LDFLAGS in compilation (fixes OGo
ifneq ($(shared),no)
APXS_CFLAGS = $(shell $(APXS) -q CFLAGS_SHLIB) $(shell $(APXS) -q CFLAGS)
APXS_INCLUDE_DIRS = -I$(shell $(APXS) -q INCLUDEDIR)
-APXS_LIBS = -l$(shell$ (APXS) -q LIBS_SHLIB)
+APXS_LIBS = $(shell$ (APXS) -q LIBS_SHLIB)
APXS_LDFLAGS = $(shell $(APXS) -q LDFLAGS_SHLIB)
else
ifneq ($(APXS),)
ifneq ($(APR),)
APR_INCLUDE_DIRS = -I$(shell $(APR) --includedir)
APR_CFLAGS = $(shell $(APR) --cppflags)
-APR_LDFLAGS = $(shell $(APR) --ldflags --libs)
+APR_LDFLAGS = $(shell $(APR) --ldflags)
+APR_LIBS = $(shell $(APR) --libs)
endif
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)/Library/WOAdaptors/Apache
$(APXS_INCLUDE_DIRS) $(APR_INCLUDE_DIRS)
LDFLAGS = $(APXS_LDFLAGS) $(APR_LDFLAGS) -shared -fPIC
+LDLIBS = $(APXS_LIBS) $(APR_LIBS)
# adaptor
$(INSTALL_PROGRAM) $(product) /usr/libexec/httpd/
$(product) : $(OFILES)
- $(LD) $(LDFLAGS) -o $@ $(OFILES) $(EXTRA_LDFLAGS)
+ $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $(OFILES) $(LDLIBS)
}
int NGBufferedDescriptor_read(NGBufferedDescriptor *self,
- void *_buf, int _len) {
- register int availBytes = numberOfAvailableReadBufferBytes(self);
-
+ void *_buf, int _len)
+{
+ register int availBytes;
+
if (self == NULL) return 0;
- if (self->readBufferSize == 0) { // no read buffering is done (buffersize==0)
+ if (self->readBufferSize == 0) // no read buffering is done (buffersize==0)
return read(self->fd, _buf, _len);
- }
-
+
+ availBytes = numberOfAvailableReadBufferBytes(self);
if (availBytes >= _len) {
// there are enough bytes in the buffer to fulfill the request
if (_len == 1) {
}
else {
memcpy(_buf, self->readBufferPos, _len);
- self->readBufferPos += _len; // update read position (consumed-size)
+ self->readBufferPos += _len; // update read position (consumed-size)
}
checkReadBufferFillState(self); // check whether all bytes where consumed
return _len;
Finally create a proper OGo.conf in /etc/apache/conf.d.
+
+Apache2 on MacOSX 10.5
+======================
+
+So you need to add the APR include dir to the make call, eg:
+
+ make apxs=/usr/sbin/apxs apr=/usr/bin/apr-1-config \
+ EXTRA_LDFLAGS="-bundle -undefined error -dynamic"
+
Apache2 on SuSE 9.0
===================
// read whole response
if (!NGBufferedDescriptor_safeRead(toApp, buffer, contentLength)) {
- if (toApp) NGBufferedDescriptor_free(toApp);
+ if (toApp != NULL) { NGBufferedDescriptor_free(toApp); toApp = NULL; }
}
// close connection to app
- if (toApp) {
- NGBufferedDescriptor_free(toApp);
- toApp = NULL;
- }
-
+ if (toApp != NULL) { NGBufferedDescriptor_free(toApp); toApp = NULL; }
+
ap_log_error(__FILE__, __LINE__, APLOG_INFO, 0, r->server,
"send response (size=%i)",
contentLength);
/*
- Copyright (C) 2000-2005 SKYRIX Software AG
+ Copyright (C) 2000-2008 SKYRIX Software AG
This file is part of SOPE.