- return NULL;
- }
- else
- {
- assert(buf2);
- if (strlen(buf2) + 1U > buflen)
- {
- log_error(LOG_LEVEL_FATAL,
- "Max line limit reached. Linenumber: %u. Lenght: %u. Max lenght: %u.",
- *linenum, strlen(buf2), buflen-1);
- }
- strlcpy(buf, buf2, buflen);
- free(buf2);
- return buf;