xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyle Coder" <x_co...@hotmail.com>
Subject Re: XalanText::substringData() BUG?
Date Sat, 06 Jan 2001 13:01:35 GMT
Hi David,
In the API docs, I see: "If the sum of offset and count exceeds the length,
then all characters to the end of the data are returned"  Calling
substringData(0, 1024) seems legal to me on an empty string (0 legnth
string).

Thanks
Lyle
----- Original Message -----
From: <David_N_Bertoni@lotus.com>
To: <general@xml.apache.org>
Sent: Sunday, January 21, 2001 7:21 AM
Subject: Re: XalanText::substringData() BUG?


>
> This is not a bug.
>
> When I look through the source code, I see no implementation for
> XalanText::substringData().  If you're talking about
> XercesTextBridge::substringData, then you'll need to be more specific
about
> where this is happening.
>
> You should read the DOM recommendation.  If the arguments for
substringData
> () are not valid, then an exception will be thrown.  This is exactly what
> happens with the Xerces DOM.  If you're not catching exceptions, then your
> program will crash.
>
> Dave
>
>
>
>
>                     "Lyle Coder"
>                     <x_coder@hotm        To:     <general@xml.apache.org>
>                     ail.com>             cc:     (bcc: David N
Bertoni/CAM/Lotus)
>                                          Subject:
XalanText::substringData() BUG?
>                     01/05/2001
>                     07:38 PM
>                     Please
>                     respond to
>                     general
>
>
>
>
>
> I'm seeing that if the XalanText node contains no data, calling
> substringData(0, 1024) causes a seg fault (actually any number for the max
> size)
>
> Is this a bug or is the semantics to always check for the node to contain
> data?  Incidentally getData() does not crash
>
> Thanks
> Lyle
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>
>

Mime
View raw message