On 14 September 2015 at 17:43, <rhuij...@apache.org> wrote: > Author: rhuijben > Date: Mon Sep 14 15:43:31 2015 > New Revision: 1702974 > > URL: http://svn.apache.org/r1702974 > Log: > Replace an ugly assertion caused by a corrupt working copy database with an > almost as ugly, but better to diagnose error message. > > Somehow these few cases which should be completely impossible to trigger > without editing wc.db are reported as TortoiseSVN exception reports. > > I explicitly only add these extra checks only to the most common read > operation, as this function is usually called first and catching every > invalid working copy database is impossible without a performance and > a maintenance impact. > > * subversion/libsvn_subr/token.c > (svn_token__from_word_err): Ensure NULL is handled safely. > > > Modified: subversion/trunk/subversion/libsvn_subr/token.c > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/token.c?rev=1702974&r1=1702973&r2=1702974&view=diff > ============================================================================== > --- subversion/trunk/subversion/libsvn_subr/token.c (original) > +++ subversion/trunk/subversion/libsvn_subr/token.c Mon Sep 14 15:43:31 2015 > @@ -64,7 +64,7 @@ svn_token__from_word_err(int *value, > if (*value == SVN_TOKEN_UNKNOWN) > return svn_error_createf(SVN_ERR_BAD_TOKEN, NULL, > _("Token '%s' is unrecognized"), > - word); > + word ? word : "(null)"); APR handles NULL strings and replaces it with (null) from 0.9.x. So this change is unnecessary. We also rely on APR handling for NULL strings in other places.
-- Ivan Zhakov