ber_read_OID_String patch

Kamen Mazdrashki kamen.mazdrashki at postpath.com
Tue Sep 8 05:08:14 MDT 2009


Hi Metze,

On Tue, Sep 8, 2009 at 13:33, Stefan (metze) Metzmacher<metze at samba.org> wrote:
> 
> http://repo.or.cz/w/Samba/aatanasov.git?a=commitdiff;h=6f7bfe2863066b14
> 095c690ca1184a880c81f1c1
> 
> -       typedef [nopush,nopull] struct {
> -
> [range(0,10000),value(ndr_size_drsuapi_DsReplicaOID_oid(oid, 0))]
> uint32 __ndr_size;
> -               [size_is(__ndr_size),charset(DOS)] uint8 *oid; /* it's
> encoded with asn1_write_OID_String() */
> +       typedef [noprint] struct {
> +               [range(0,10000)] uint32 length;
> +               [size_is(length)] uint8 *oid;
>         } drsuapi_DsReplicaOID;
> 
> please rename oid to binary_oid and fix all callers to cope with binary
> data. With this patch you'll generate some compilers and bugs, because
> we now pass a binary buffer as string (while casting uint8_t * to char
> *).
> 
> I fear the patch will be much larger...
> 

I was just about to ask you for allowing me to implement this change :)
I haven't done an impact analysis yet, but at first sight, it seems it won't
be a small patch.

Btw, I was planning to do this after the plugfest - right now I want to spent
most of my time on chasing issues and writing tests so you have more issues
to talk about with MS guys.
Is this plan OK with you?

Thanks,
Kamen Mazdrashki
kamen.mazdrashki at postpath.com
CISCO SYSTEMS BULGARIA EOOD
18 Macedonia Blvd. Sofia 1606
Bulgaria
http://www.cisco.com/global/BG/




More information about the samba-technical mailing list