From: Ezra Peisach Date: Fri, 20 Nov 2009 03:42:40 +0000 (+0000) Subject: The size of kadm5_server_handle_rec differs between the client and X-Git-Tag: krb5-1.8-alpha1~170 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0df297ff0cb581f764e3acf1dab661f322d2b42e;p=krb5.git The size of kadm5_server_handle_rec differs between the client and server code. Valgrind picked up on access past end of allocated structure. Include proper internal header in client/server test. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23294 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm5/unit-test/Makefile.in b/src/lib/kadm5/unit-test/Makefile.in index 8afe66a3c..caa4e2d2f 100644 --- a/src/lib/kadm5/unit-test/Makefile.in +++ b/src/lib/kadm5/unit-test/Makefile.in @@ -23,10 +23,13 @@ destroy-test: destroy-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o destroy-test destroy-test.o \ $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) -client-handle-test: handle-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o client-handle-test handle-test.o \ +client-handle-test: client-handle-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) + $(CC_LINK) -o client-handle-test client-handle-test.o \ $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) +client-handle-test.o: handle-test.c + $(CC) $(ALL_CFLAGS) -DCLIENT_TEST -o client-handle-test.o -c $(srcdir)/handle-test.c + client-iter-test: iter-test.o $(KADMLCNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o client-iter-test iter-test.o \ $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) @@ -128,7 +131,7 @@ unit-test-server-body: site.exp test-handle-server lock-test clean:: $(RM) init-test client_init.o init-test.o $(RM) destroy-test destroy-test.o - $(RM) client-handle-test handle-test.o + $(RM) client-handle-test handle-test.o client-handle-test.o $(RM) client-iter-test iter-test.o $(RM) randkey-test randkey-test.o $(RM) server-handle-test handle-test.o diff --git a/src/lib/kadm5/unit-test/handle-test.c b/src/lib/kadm5/unit-test/handle-test.c index 56eac844a..9f0e3feaa 100644 --- a/src/lib/kadm5/unit-test/handle-test.c +++ b/src/lib/kadm5/unit-test/handle-test.c @@ -7,8 +7,12 @@ #include #include #include +#ifdef CLIENT_TEST #include - +#else +#include +#include +#endif int main(int argc, char *argv[]) {