[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking errors in the asn1_order functions
From: |
Kurt Roeckx |
Subject: |
Re: Checking errors in the asn1_order functions |
Date: |
Sun, 20 Apr 2014 11:29:29 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sun, Apr 20, 2014 at 09:22:12AM +0200, Kurt Roeckx wrote:
> On Sat, Apr 19, 2014 at 11:47:14PM +0200, Kurt Roeckx wrote:
> > I currently don't understand the test suite, so I have no idea
> > whether it's a problem or not that the error code changes.
>
> I think it's actually an error in the ordering function and I'm
> looking at it.
It didn't end up being what I thought it was. As far as I can see
the problem is this call:
if (move == UP)
{
len2 = _asn1_strtol (p->value, NULL, 10);
_asn1_set_value (p, NULL, 0);
if ((type_field (p->type) == ASN1_ETYPE_SET_OF)
&& (max_len - len2 > 0))
{
_asn1_ordering_set_of (der + len2, max_len - len2, p);
Where maxlen - len2 == 1. asn1_get_tag_der() checks for der_len < 2
and returns ASN1_DER_ERROR.
I don't understand enough about the code to know if this is all
normal or not.
Kurt