Fix potential segfault when parsing helper output
Fix a potential segfault while parsing the output of an enrollment
helper. While cm_subproc_get_msg() ensures that the buffer we get back
is nul-terminated, and we depended on that, when we would memdup it to
keep the value around, we weren't continuing to make that guarantee, at
times leading to off-by-one reads. From a report by Steve Neuharth.