Is it worthwhile validating that ````state->frame_length```` is within ````HSUM_MAX_FRAME_LENGTH```` here?