Stefan Sperling wrote: > - assert(strlen(txn_id) < sizeof(txn->txn_id)); > - strncpy(txn->txn_id, txn_id, sizeof(txn->txn_id) - 1); > - txn->txn_id[sizeof(txn->txn_id) - 1] = '\0'; > + end = apr_cpystrn(txn->txn_id, txn_id, sizeof(txn->txn_id)); > + if (end < txn->txn_id + strlen(txn_id)) > + return svn_error_createf(SVN_ERR_FS_TXN_NAME_TOO_LONG, NULL, > + _("Transaction name '%s' was truncated"), > txn_id);
The "was truncated" error message is not helpful. (That sounds like the server is saying, "I have renamed one of your transactions".) Any reason not to use SVN_ERR_ASSERT? The logic looks correct. - Julian