diff options
Diffstat (limited to 'source3/libads/authdata.c')
-rw-r--r-- | source3/libads/authdata.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libads/authdata.c b/source3/libads/authdata.c index 8e951dde80..9dfb9cba09 100644 --- a/source3/libads/authdata.c +++ b/source3/libads/authdata.c @@ -451,10 +451,11 @@ static BOOL pac_io_pac_signature_data(const char *desc, PAC_SIGNATURE_DATA *data, uint32 length, prs_struct *ps, int depth) { - uint32 siglen = length - sizeof(uint32); + uint32 siglen = 0; + prs_debug(ps, depth, desc, "pac_io_pac_signature_data"); depth++; - + if (data == NULL) return False; @@ -463,6 +464,9 @@ static BOOL pac_io_pac_signature_data(const char *desc, if (!prs_uint32("type", ps, depth, &data->type)) return False; + if ( length > sizeof(uint32) ) + siglen = length - sizeof(uint32); + if (UNMARSHALLING(ps) && length) { if (siglen) { data->signature.buffer = PRS_ALLOC_MEM(ps, uint8, siglen); |