Menu

#134 Example trdp-xmlpd-test crash due to zero elemSize.

1.3.2.0
closed
None
2017-02-08
2017-01-24
No

SVN Revision 1576
OS: Linux x86 ubuntu

The test example crashes when correct dataset xml is not given as argument.

The folloing is location of crash in trdp-xmlpd-test.c::fillDatasetElem. elemType is 0 when dataset element type is not equal to text description given in trdp_types.h.
/ Get size of dataset element /
elemSize = aSizes[elemType];
/ Align the offset /
if (offset % elemSize)
offset += (elemSize - (offset % elemSize));

Example BOOLEAN8 instead of BOOL8. BOOL8 is correct.
<data-set name="testDS1004" id="user-content-1004">
<element name="b" type="BOOLEAN8">
</element></data-set>

Expectation: The example trdp-xmlpd-test should not crash in this case.

Discussion

  • Bernd Löhr

    Bernd Löhr - 2017-02-08
    • status: open --> pending
    • assigned_to: Bernd Löhr
    • Milestone: 1.4.0.0 --> 1.3.2.0
     
  • Bernd Löhr

    Bernd Löhr - 2017-03-02
    • Status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB