Author: rafaelb
Date: Wed Jul 6 03:38:47 2016
New Revision: 1751584
URL: http://svn.apache.org/viewvc?rev=1751584&view=rev
Log:
Fixed Bug: AXIS2C-1674. Simple HttpServer crashes when reading directories in
Windows 2012 Server
Modified:
axis/axis2/c/core/trunk/util/src/stream.c
Modified: axis/axis2/c/core/trunk/util/src/stream.c
URL:
http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/src/stream.c?rev=1751584&r1=1751583&r2=1751584&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/src/stream.c (original)
+++ axis/axis2/c/core/trunk/util/src/stream.c Wed Jul 6 03:38:47 2016
@@ -102,6 +102,14 @@ axutil_stream_free(
axutil_stream_t *stream,
const axutil_env_t *env)
{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ //avoid access violation / segment fault
+ if (stream == NULL)
+ {
+ return;
+ }
+
switch(stream->stream_type)
{
case AXIS2_STREAM_BASIC: