[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] extend svn_subst_translate_string2() with a REPAIR parameter

From: Danny Trebbien <dtrebbien_at_gmail.com>
Date: Fri, 14 Jan 2011 17:57:40 -0800

On Fri, Jan 14, 2011 at 12:32 PM, Danny Trebbien <dtrebbien_at_gmail.com> wrote:
> Attached are a patch and log message to extend
> svn_subst_translate_string2() with a new parameter, REPAIR. This
> allows the caller to customize whether the translation repairs line
> endings.

I noticed a slight problem with the extra asserts in
test_svn_subst_translate_string2() of
subversion/tests/libsvn_subr/subst_translate-test.c that this patch
adds. When REPAIR is FALSE and VALUE has inconsistent line endings,
then an SVN_ERR_IO_INCONSISTENT_EOL error is returned. If, however, a
future change causes svn_subst_translate_string2() to return
SVN_NO_ERROR, then the assert that the error was
SVN_ERR_IO_INCONSISTENT_EOL would dereference a NULL pointer.

Attached are the patch and log message for version 1.1 of this patch.
The new patch corrects this flaw. The new log message corrects a
grammar mistake.

Received on 2011-01-15 02:58:23 CET

This is an archived mail posted to the Subversion Dev mailing list.