-const char loaders_rcs[] = "$Id: loaders.c,v 1.72 2009/04/24 15:29:43 fabiankeil Exp $";
+const char loaders_rcs[] = "$Id: loaders.c,v 1.73 2009/05/16 13:27:20 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loaders.c,v $
else
{
assert(buf2);
- assert(strlen(buf2) + 1U < buflen);
- strncpy(buf, buf2, buflen - 1);
+ 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);
- buf[buflen - 1] = '\0';
return buf;
}
}