messages encoded with section 2 content are unreadable

Bug #759973 reported by cpb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libECBUFR
Fix Committed
Medium
vanh souvanlasy

Bug Description

If you actually encode a message containing Section 2 data, the result is unreadable (to both LibECBUFR and MetManager and maybe others).

Will commit a test case.

Revision history for this message
cpb (chris-beauregard) wrote :

Running test_section2 under a debugger suggests the read is looking for section 5 about 4 bytes short of the actual location, which suggests section 2 is too short.

cpb (chris-beauregard)
Changed in libecbufr:
importance: Undecided → Medium
Revision history for this message
cpb (chris-beauregard) wrote :

Debug output for the test_section2 is giving me:

   Warning: length of Section 4 is 8, should have been -6

which is interesting, because there's exactly 14 bytes in my (padded) section 2 including data and header. Somehow section 2 isn't being included in a message length count somewhere.

Changed in libecbufr:
status: New → Fix Committed
assignee: nobody → vanh souvanlasy (vanh-souvanlasy)
Revision history for this message
cpb (chris-beauregard) wrote :

Turning this over to you, vanh, to check my work. I don't entirely like the fix.

Revision history for this message
cpb (chris-beauregard) wrote :

In addition, the section2 header_len was being initialized to 5 instead of 4.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.