Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4 Fix for [1365811] bug report

closed-fixed
None
5
2006-02-20
2006-02-15
Taras Strypko
No

I feel like it would be usefull to post a quick patch
for [1365811] "Deserialising a null string produces a
run-time error" i've posted earlier.

One working with VisiBroker 4.x might at some point
discover that IIOP.Net is raising an overflow exception
when [vbroker.orb.enableNullString=true] feature of VB
is used. This feature allows string values, which
represent null, to have a zero length. However,
IIOP.NET assumes a string value to have at least one
byte, thus causing an overflow during deserialisation.

This patch implements a check before deserialising a
string value, and returns null on zero-length string.

Discussion

  • Taras Strypko
    Taras Strypko
    2006-02-15

    Fix for [1365811] bug report

     
  • Logged In: YES
    user_id=660259

    Hi

    Thank you for detailing this issue and for providing the
    patch.
    I've integrated it on the 1.9 branch.

    I've changed it slightly to return String.Empty instead of
    null, because that's more consistent with wstring (length 0
    leads there to an empty string, because no terminating 0
    char required) and legal according to corba spec.
    Null is not allowed as value for a string/wstring.
    For string, the length must be at least one, because a
    terminating 0 is required.
    This rules are detailed in CORBA 2.6 spec, chapter 15.3.2.7.

    As a thank you for your contribution, I would like to add
    your name to the thank you list, if you agree (see
    http://iiop-net.sourceforge.net/faq.html#faq8_2\).

    Please tell me, if this works for you.
    Thank you
    Best regards!

     
    • assigned_to: nobody --> dullmann
    • status: open --> closed-fixed