Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-283

The deserialiser does not decode LONG arrays

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4 Final
    • Serialization
    • None
    • n/a

    Description

      When deserialising a LONG array, the code eventually calls the macro DESERIALIZE_ENCODED_ARRAY_BLOCK( LONGLONG, CONV_STRTOUL). This macro is out of date because it does not do two things
      1. The Array size is set to zero, so no elements are ever read.
      2. The string to long function returns the wrong value!

      To fix this macro, copy the expanded code used in the XSD_INT case and substute 'LONGLONG' for 'int' when ever it appears. The change the strtol() function to correctly create the type required.

      I suspect that this problem will re-occur in other arrays of different types that still use the old macro (i.e XSD_UNSIGNEDINT, XSD_UNSIGNEDSHORT, XSD_BTYE, XSD_INTEGER, XSD_UNSIGNEDLONG, XSD_FLOAT, etc) altough others do mysteriously seem to work (XSD_STRING).

      Attachments

        Activity

          People

            prestonf Fred Preston
            prestonf Fred Preston
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: