gnutls-devel
[Top][All Lists]
Advanced

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

Re: [gnutls-dev] GnuTLS 2.0.0


From: Simon Josefsson
Subject: Re: [gnutls-dev] GnuTLS 2.0.0
Date: Tue, 11 Sep 2007 08:47:35 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> No, it's an actual bug, observed on PowerPC (and the RPATH problem
> _was_ solved AFAICS).

Ok, I applied the patch.

> Is `gnutls_x509_crt_get_dn_oid ()' supposed to return a
> null-terminated string?  The documentation doesn't mention it and it
> seems that it's not returning a null-terminated string.

I'm not sure, _gnutls_x509_get_dn_oid contains this code:

              len = strlen (oid) + 1;

              if (*sizeof_oid < (unsigned) len)
                {
                  *sizeof_oid = len;
                  gnutls_assert ();
                  return GNUTLS_E_SHORT_MEMORY_BUFFER;
                }

              memcpy (_oid, oid, len);
              *sizeof_oid = len - 1;

Which indicate that the intention is to copy the terminating zero.
However, it may be that the call to asn1_read_value did not add a zero.
That may be a bug, typically asn1_read_value do zero-terminate strings
if I recall correctly (although it isn't well documented either).

> In any case, using `scm_take_locale_stringn ()' instead of just
> `scm_take_locale_string ()' can't hurt.

Right.

/Simon



reply via email to

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