Need error checking on BUFR Master Table number
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libECBUFR |
Fix Committed
|
High
|
vanh souvanlasy |
Bug Description
Background
In a BUFR message, Octet 4 of Section 1 contains the BUFR Master Table number. This number is an overarching identifier for the content of Tables B and D, and NOT a version number. Currently, the BUFR regulations permit two legal values for this: zero and ten. (For Meteorology and Oceanography, respectively.) Libecbufr only handles the Meteorology Tables. The Oceanography Tables find little operational use, at least for the time being, and are not implemented by CMC.
Bug Description
Therefore, for libecbufr to proceed with decoding when the Master Table number is a non-zero value is not correct behaviour.
Proposed Fix
The software should check Octet 4 and proceed as follows:
Value = 0 ; proceed with decoding
Value = 10; issue message "Oceanography Tables are not supported by libecbufr" or in French "Les tables océanographiques ne sont pas prises en charge par libecbufr". Stop processing.
Any other value: Output the value; issue message "This Master Table number is not supported by WMO BUFR regulations. Check Octet 4 in Section 1." or in French "Ce numéro de table maîtresse n'est pas pris en charge par les règles d'encodage BUFR de l'OMM. Vérifiez l'octet 4 de la section 1." Stop processing.
Changed in libecbufr: | |
importance: | Undecided → High |
description: | updated |
Changed in libecbufr: | |
assignee: | nobody → vanh souvanlasy (vanh-souvanlasy) |
status: | New → In Progress |
Changed in libecbufr: | |
status: | In Progress → Fix Committed |
"Stop processing."
Why not just set BUFR_FLAG_INVALID and proceeding like we normally do? Refusing to process at all completely precludes using LibECBUFR to even attempt to handle the other master tables, if only for development purposes.