(asn1_der_coding): For TYPE_NULL, increment counter even if we don't
authorSimon Josefsson <simon@josefsson.org>
Tue, 19 Sep 2006 10:22:31 +0000 (10:22 +0000)
committerSimon Josefsson <simon@josefsson.org>
Tue, 19 Sep 2006 10:22:31 +0000 (10:22 +0000)
write any output.  Reported by Stephen Wrobleski
<steve@localtoast.org>.

lib/coding.c

index 206b8c0..cd646c7 100644 (file)
@@ -913,7 +913,8 @@ asn1_der_coding (ASN1_TYPE element, const char *name, void *ider, int *len,
        case TYPE_NULL:
          max_len--;
          if (max_len >= 0)
-           der[counter++] = 0;
+           der[counter] = 0;
+         counter++;
          move = RIGHT;
          break;
        case TYPE_BOOLEAN: