[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testing Context O/J

From: Simon Josefsson
Subject: Re: testing Context O/J
Date: Wed, 20 Apr 2011 08:36:54 +0200
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/23.2 (gnu/linux)

"Abdulrahman I. ALGhadir" <address@hidden> writes:

> Hey again,
> Sorry it took me awhile to do the test due the fact I was abit busy back then.
> When I was trying to compile the test-lookup.c with a set of examples of 
> existent domains I got this error msg:
> expected rc 0 got rc -206
> I have attached the file in case you want to see them.

Hi again.  I hadn't noticed you had added more domains, and though you
were problem with the shipped test vectors.  For reference, the first
domain that you added that trigger the problem is this one:


The error is:

  2  IDN2_TOO_BIG_LABEL                                                 
expected rc 0 got rc -206

Looking at the code it the TOO_BIG_LABEL check is clearly at the wrong

static int
label (const uint8_t * src, size_t srclen, uint8_t * dst, size_t * dstlen,      
/* assumed to be 63 */
       int flags)
  if (srclen > 63)
    return IDN2_TOO_BIG_LABEL;

In other words, it is comparing the UTF-8 data against 63 and not the
ACE encoded output.

I have had some discussion about the label/domainname length checks
before, and had some suspicion that there are bugs in that code.  I'll
rework this and make sure it is correct.

Thank you for reporting this!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]