Vlad Skvortsov <vss@73rus.com>

Found Patch
r863566 r863064

r863064 | dlr | 2007-01-12 19:16:45 +0000 (Fri, 12 Jan 2007)

* www/links.html: Add DITrack.

Patch by: Vlad Skvortsov <vss@73rus.com>

r863566 | malcolm | 2007-02-24 07:59:17 +0000 (Sat, 24 Feb 2007)

Fix a hang during character set translation by ensuring that we can
always make progress through a string.

If we're converting to a multibyte encoding (such as UTF-8), we need
to ensure that we always have at least the space required to convert
any valid character in the source encoding, otherwise we won't make
any progress and will hang.

For conversions to UTF-8, that means we always need to have at least
three spare bytes in the output buffer (for characters in the BMP),
and that sounds like a good assumption for other encodings as well.

Found by: Vlad Skvortsov <vss@73rus.com>

* subversion/libsvn_subr/utf.c
  (convert_to_stringbuf): Expand the destination buffer using a 1:3
    ratio whenever we have less than 3 bytes spare, ensuring we can
    always make progress through a string.