[PATCH v5.4-v4.19] CDC-NCM: avoid overflow in sanity checking