Fix an uninitialized variable
authorVolker Lendecke <vl@samba.org>
Sun, 21 Mar 2010 19:59:13 +0000 (20:59 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 21 Mar 2010 20:01:28 +0000 (21:01 +0100)
lib/util/asn1.c

index 9e3d3eeb93aa0423d530017fe5e05cb875c61405..8f30cfe2c677cfe982636607466ad63f7c77631b 100644 (file)
@@ -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)) {