Open vsouvan opened 4 years ago
(by chris-beauregard) 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.
(by chris-beauregard) 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.
(by chris-beauregard) Turning this over to you, vanh, to check my work. I don't entirely like the fix.
(by chris-beauregard) In addition, the section2 header_len was being initialized to 5 instead of 4.
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.
Imported from Launchpad using lp2gh.