libtasn1-commit
[Top][All Lists]
Advanced

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

[SCM] GNU libtasn1 branch, master, updated. libtasn1_3_4-33-g16cb843


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU libtasn1 branch, master, updated. libtasn1_3_4-33-g16cb843
Date: Thu, 01 May 2014 20:47:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".

http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=16cb84308aa6e569a553442131d7d2ac8904b4f5

The branch, master has been updated
       via  16cb84308aa6e569a553442131d7d2ac8904b4f5 (commit)
      from  47364430f0ec21e2e4a8923a2fc6320ddbf42887 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 16cb84308aa6e569a553442131d7d2ac8904b4f5
Author: Kurt Roeckx <address@hidden>
Date:   Thu May 1 14:15:54 2014 +0200

    Use the smallest of the 2 lengths for the comparison
    
    We're sorting 2 strings here based on X.690 section 11.6 and 6.3

-----------------------------------------------------------------------

Summary of changes:
 lib/coding.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/coding.c b/lib/coding.c
index 6fb7c05..e4eb060 100644
--- a/lib/coding.c
+++ b/lib/coding.c
@@ -30,6 +30,7 @@
 #include "parser_aux.h"
 #include <gstr.h>
 #include "element.h"
+#include "minmax.h"
 #include <structure.h>
 
 #define MAX_TAG_LEN 16
@@ -850,7 +851,7 @@ _asn1_ordering_set_of (unsigned char *der, int der_len, 
asn1_node node)
   struct vet *first, *last, *p_vet, *p2_vet;
   asn1_node p;
   unsigned char *temp, class;
-  unsigned long k, max;
+  unsigned long k, length;
   int err;
 
   counter = 0;
@@ -923,13 +924,9 @@ _asn1_ordering_set_of (unsigned char *der, int der_len, 
asn1_node node)
       counter = 0;
       while (p2_vet)
        {
-         if ((p_vet->end - counter) > (p2_vet->end - p_vet->end))
-           max = p_vet->end - counter;
-         else
-           max = p2_vet->end - p_vet->end;
-
+         length = MIN(p_vet->end - counter, p2_vet->end - p_vet->end);
          change = -1;
-         for (k = 0; k < max; k++)
+         for (k = 0; k < length; k++)
            if (der[counter + k] > der[p_vet->end + k])
              {
                change = 1;


hooks/post-receive
-- 
GNU libtasn1



reply via email to

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