Uh, sorry, that code is in XalanUTF16Writer.hpp (the *header* file as opposed 
to the implementation file)

From: Martin Elzen [mailto:martin.el...@usoft.com]
Sent: Tuesday, September 13, 2011 6:03 PM
To: xalan-dev@xml.apache.org
Subject: XalanUTF16Writer.hpp sizeof-buffer code incorrect?

Hi all,

Today a client of ours told us about a crash they were experiencing with the 
version of Xalan we use.
After looking into it, it seems to us that the sizeof-buffer determination 
within the first if in XalanUTF16Writer::write (line 119 of 
XalanUTF16Writer.cpp)
is not quite correct.
currently in the SVN version of today it is:
if (theLength > sizeof(m_buffer))

while we think it ought to be:
if (   theLength > (sizeof(m_buffer) / sizeof(value_type) )   )

has anyone else run into this?


Sincerely,
Martin








________________________________
The information contained in this communication is intended solely for the use 
of the individual or entity to whom it is addressed and others authorized to 
receive it. It may contain confidential or legally privileged information. If 
you are not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or taking any action in reliance on the contents of this 
information is strictly prohibited and may be unlawful. If you have received 
this communication in error, please notify us immediately by forwarding this 
email to mailad...@usoft.com and then delete it from your system.

USoft is neither liable for the proper and complete transmission of the 
information contained in this communication nor for any delay in its receipt.

Reply via email to