Verify Each Inbound Message

Programs must verify each inbound message field to assure integrity and robustness (so that inappropriate or unexpected messages do not cause errors within the program).

For example, always verify that a field has the expected datatype. Consider a suite of programs that uses a field named SCORES to carry an array of integer values. When a new program begins sending messages in which SCORES contains a string value, the existing programs must exhibit robust behavior. To ensure robustness, always check the datatype of a field before operating on its data value.