ber_read_OID_String patch

Stefan (metze) Metzmacher metze at samba.org
Tue Sep 8 04:33:14 MDT 2009


Kamen Mazdrashki schrieb:
> Hi again,
> 
> On Mon, Sep 7, 2009 at 15:33, Kamen Mazdrashki<kamen.mazdrashki at postpath.com> wrote:
>> Please see the attached log file - it is produced by extending the
>> DSSYNC test a little bit and by tuning the drsuapi.idl file a little
>> bit (I will publish the branch tomorrow so you could play with it if
>> you wish to).
> 
> The branch is published at:
> http://repo.or.cz/w/Samba/aatanasov.git?a=shortlog;h=refs/heads/drsuapi_prefixmap

http://repo.or.cz/w/Samba/aatanasov.git?a=commitdiff;h=6f7bfe2863066b14095c690ca1184a880c81f1c1

-       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...

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090908/bb139d4d/attachment.pgp>


More information about the samba-technical mailing list