if (!asn1_print_info(bp, tag, xclass, j, (indent) ? depth : 0))
goto end;
if (j & V_ASN1_CONSTRUCTED) {
+ const unsigned char *sp = p;
+
ep = p + len;
if (BIO_write(bp, "\n", 1) <= 0)
goto end;
ret = 0;
goto end;
}
- if ((r == 2) || (p >= tot))
+ if ((r == 2) || (p >= tot)) {
+ len = p - sp;
break;
+ }
}
- } else
+ } else {
while (p < ep) {
- r = asn1_parse2(bp, &p, (long)len,
+ sp = p;
+ r = asn1_parse2(bp, &p, len,
offset + (p - *pp), depth + 1,
indent, dump);
if (r == 0) {
ret = 0;
goto end;
}
+ len -= p - sp;
}
+ len = length;
+ }
} else if (xclass != 0) {
p += len;
if (BIO_write(bp, "\n", 1) <= 0)
goto end;
dump_cont = 1;
}
- BIO_printf(bp, ":%u", p[0]);
+ if (len > 0)
+ BIO_printf(bp, ":%u", p[0]);
} else if (tag == V_ASN1_BMPSTRING) {
/* do the BMP thang */
} else if (tag == V_ASN1_OCTET_STRING) {