summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/asn1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/util/asn1.c b/lib/util/asn1.c
index 9e3d3eeb93..8f30cfe2c6 100644
--- a/lib/util/asn1.c
+++ b/lib/util/asn1.c
@@ -600,6 +600,10 @@ static bool _ber_read_OID_String_impl(TALLOC_CTX *mem_ctx, DATA_BLOB blob,
tmp_oid = talloc_asprintf_append_buffer(tmp_oid, ".%u", b[0]%40);
if (!tmp_oid) goto nomem;
+ if (bytes_eaten != NULL) {
+ *bytes_eaten = 0;
+ }
+
for(i = 1, v = 0; i < blob.length; i++) {
v = (v<<7) | (b[i]&0x7f);
if ( ! (b[i] & 0x80)) {