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

Re: svn commit: r26755 - trunk/subversion/libsvn_subr

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2007-09-24 11:20:19 CEST

On Sat, Sep 22, 2007 at 01:43:40PM -0700, dionisos@tigris.org wrote:
> Eliminate endless loop edge-case (resolves issue #2577).
>
> Before, if no character could be converted, but the remaining buffer size
> was 3 or more, we'd loop endlessly.

I must admit that I'm unsure as to how this is possible - do you have an
example case? (We only convert from UTF-8 <> native, and I don't believe
there are any native encodings that include characters outside the
Unicode BMP, or that take more than three [actually, two] bytes per
character to encode natively).

> - } while (! apr_err && srclen);
> + } while (apr_err == APR_SUCCESS && srclen != 0);

[Is the latter really better than the former? APR_SUCCESS is zero by
definition.]

Regards,
Malcolm

  • application/pgp-signature attachment: stored
Received on Mon Sep 24 12:09:05 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.