axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chinmoy Bhattacharjee" <chinmoy.bhattachar...@gmail.com>
Subject Axis 1.6b C++ --- Bug in QName.cpp
Date Tue, 05 Dec 2006 02:05:26 GMT
Hi,

This looks like a bug in src/xml/QName.cpp

Notice the code below :-

void
QName::splitQNameString(const XML_Ch* qname, XML_Ch sep)
{
    XML_Ch *p = const_cast<XML_Ch*>(qname);
    while (*p)
    {
        if (*p == sep)
        {
            *p = '\0'; /* put null to separate local name from namespace */
            localname = ++p; /* now p points to localpart */
            uri = qname; /* qname points to uri */
            //  -------------- There should be a return here ???
---------------------------
        }
        p++;
    }
    /* if there is no separator that means there is no uri */
    localname = qname;
    uri = 0; /* no uri */
}

Even if a separator exists, there is no return call from the loop. Hence,
the end result will always set the localname to the URI portion. The URL
will always be NULL.

I am not sure what the mergeQNameString is expected to do in the face of the
current situation.

Since this methods are used in determining the size of array structures -
array data types do not work.

- Chinmoy

Mime
View raw message