From cca199fb8f3d610c9881444732ca4375c093fa90 Mon Sep 17 00:00:00 2001 From: damitha Date: Wed, 7 Jul 2010 08:44:19 +0000 Subject: refer jira AXIS2C-1469 git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@961305 13f79535-47bb-0310-9956-ffa450edef68 --- guththila/src/guththila_xml_parser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guththila/src/guththila_xml_parser.c b/guththila/src/guththila_xml_parser.c index f48572f..90598bf 100644 --- a/guththila/src/guththila_xml_parser.c +++ b/guththila/src/guththila_xml_parser.c @@ -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) -- cgit v1.1-32-gdbae