]> git.samba.org - jelmer/samba4-debian.git/commitdiff
lsa.idl: strlen_m*() also for the lsa_AsciiString* versions
authorStefan Metzmacher <metze@samba.org>
Tue, 19 Feb 2008 13:47:22 +0000 (14:47 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 19 Feb 2008 14:59:05 +0000 (15:59 +0100)
We already did this before b994f899b42d294c0418bdc82660a2f7510667d6.

This is needed to handle NULL strings, where strlen() would crash...

Maybe we should add a strlen_a() and strlen_a_term() later...

metze

source/librpc/idl/lsa.idl

index 64fb2336bb6ec03f44e3202f5fb2f9cb345fd4bd..3159a7d16d30601cc912b140f423e8fe6eae6cef 100644 (file)
@@ -33,14 +33,14 @@ import "security.idl";
        } lsa_Strings;
 
        typedef [public] struct {
-               [value(strlen(string))] uint16 length;
-               [value(strlen(string))] uint16 size;
+               [value(strlen_m(string))] uint16 length;
+               [value(strlen_m(string))] uint16 size;
                [charset(DOS),size_is(size),length_is(length)] uint8 *string;
        } lsa_AsciiString;
 
        typedef [public] struct {
-               [value(strlen(string))] uint16 length;
-               [value(strlen(string)+1)] uint16 size;
+               [value(strlen_m(string))] uint16 length;
+               [value(strlen_m_term(string))] uint16 size;
                [charset(DOS),size_is(size),length_is(length)] uint8 *string;
        } lsa_AsciiStringLarge;