You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by da...@apache.org on 2010/07/07 10:44:19 UTC

svn commit: r961305 - /axis/axis2/c/core/trunk/guththila/src/guththila_xml_parser.c

Author: damitha
Date: Wed Jul  7 08:44:19 2010
New Revision: 961305

URL: http://svn.apache.org/viewvc?rev=961305&view=rev
Log:
refer jira AXIS2C-1469

Modified:
    axis/axis2/c/core/trunk/guththila/src/guththila_xml_parser.c

Modified: axis/axis2/c/core/trunk/guththila/src/guththila_xml_parser.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/guththila/src/guththila_xml_parser.c?rev=961305&r1=961304&r2=961305&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/guththila/src/guththila_xml_parser.c (original)
+++ axis/axis2/c/core/trunk/guththila/src/guththila_xml_parser.c Wed Jul  7 08:44:19 2010
@@ -1773,8 +1773,8 @@ guththila_next_no_char(
     }
     else if(m->reader->type == GUTHTHILA_IO_READER || m->reader->type == GUTHTHILA_FILE_READER)
     {
-        if(m->next < GUTHTHILA_BUFFER_PRE_DATA_SIZE(m->buffer)
-            + GUTHTHILA_BUFFER_CURRENT_DATA_SIZE(m->buffer) + no && m->buffer.cur_buff != -1)
+        if(m->next + no <= GUTHTHILA_BUFFER_PRE_DATA_SIZE(m->buffer)
+            + GUTHTHILA_BUFFER_CURRENT_DATA_SIZE(m->buffer) && m->buffer.cur_buff != -1) 
         {
             for(i = 0; i < no; i++)
             {
@@ -1784,8 +1784,8 @@ guththila_next_no_char(
             return (int)no;
             /* We are sure that the difference lies within the int range */
         }
-        else if(m->next >= GUTHTHILA_BUFFER_PRE_DATA_SIZE(m->buffer)
-            + GUTHTHILA_BUFFER_CURRENT_DATA_SIZE(m->buffer) + no && m->buffer.cur_buff != -1)
+        else if(m->next + no > GUTHTHILA_BUFFER_PRE_DATA_SIZE(m->buffer)
+            + GUTHTHILA_BUFFER_CURRENT_DATA_SIZE(m->buffer) && m->buffer.cur_buff != -1) 
         {
             /* We are sure that the difference lies within the int range */
             if(m->buffer.cur_buff == (int)m->buffer.no_buffers - 1)