Werk #12707: md check: crashes with IndexError (list index out of range) on invalid input

Component Checks & agents
Title md check: crashes with IndexError (list index out of range) on invalid input
Date Apr 9, 2021
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.1.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
2.0.0p2 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

Fed with input different from what the md check is made for it tries to access non-existent input elements and crashes with unhandled IndexError exception. This change makes md check for the minimum number of expected elements before accessing them.

To the list of all Werks