Fix buffer overrun by one in the setting of l_prefix/l_prefix2