From 22eda9f6e7a768bcac959c00688d4bc0a3f47a79 Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Thu, 1 May 2003 17:03:25 +0000 Subject: [PATCH] * kadm_stream.c: Fixed vts_long() and vts_short() so they return a pointer to the beginning of the memory they allocate and place their data at the end of the buffer which was passed in git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15388 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/ChangeLog | 8 +++++++- src/lib/krb4/kadm_stream.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 907e771c2..73e033aa2 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,4 +1,10 @@ -2003-04-04 Alexandra Ellwood +2003-05-01 Alexandra Ellwood + ÊÊ + * kadm_stream.c: Fixed vts_long() and vts_short() so they return a + pointer to the beginning of the memory they allocate and place + their data at the end of the buffer which was passed in. + +2003-04-14 Alexandra Ellwood * g_ad_tkt.c: Added support for login library to get_ad_tkt. Support is copied from Mac Kerberos4 library and conditionalized diff --git a/src/lib/krb4/kadm_stream.c b/src/lib/krb4/kadm_stream.c index 3a9861eda..dc9fef110 100644 --- a/src/lib/krb4/kadm_stream.c +++ b/src/lib/krb4/kadm_stream.c @@ -129,8 +129,11 @@ vts_short(KRB_UINT32 dat, u_char **st, int loc) if (p == NULL) return -1; + *st = p; /* KRB4_PUT32BE will modify p */ + + p += loc; /* place bytes at the end */ KRB4_PUT16BE(p, dat); - *st = p; + return 2; } @@ -145,8 +148,11 @@ vts_long(KRB_UINT32 dat, u_char **st, int loc) if (p == NULL) return -1; + *st = p; /* KRB4_PUT32BE will modify p */ + + p += loc; /* place bytes at the end */ KRB4_PUT32BE(p, dat); - *st = p; + return 4; } -- 2.26.2