Author: pini
Date: Sun Jan  6 21:27:25 2008
New Revision: 609517

URL: http://svn.apache.org/viewvc?rev=609517&view=rev
Log:
Fixing jira issue 883

Modified:
    webservices/axis2/trunk/c/samples/server/mtom/mtom.c

Modified: webservices/axis2/trunk/c/samples/server/mtom/mtom.c
URL: 
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/mtom/mtom.c?rev=609517&r1=609516&r2=609517&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/mtom/mtom.c (original)
+++ webservices/axis2/trunk/c/samples/server/mtom/mtom.c Sun Jan  6 21:27:25 
2008
@@ -1,4 +1,4 @@
-
+L
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -119,6 +119,13 @@
                         data_handler_res = axiom_data_handler_create(env, 
NULL, NULL);
                         
                         buff = AXIS2_MALLOC(env->allocator, 
sizeof(axis2_byte_t)*buff_len);
+                       if (!buff)
+                         {
+                           AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI,
+                                            "malloc failed, not enough 
memory");
+                           return AXIS2_FAILURE;
+                         }
+
                         memcpy(buff, input_buff, buff_len);
 
                         axiom_data_handler_set_binary_data(data_handler_res, 
env, buff, buff_len);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to