1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

r18846: Fix the same bug Volker noticed when marshalling/unmarshalling

SEC_ACE. "type" is also an enum that may be any size. Treat as
a uint8.
Jeremy.
This commit is contained in:
Jeremy Allison 2006-09-23 18:24:03 +00:00 committed by Gerald (Jerry) Carter
parent 7c5d66c971
commit fd97f48ba3

View File

@ -53,6 +53,7 @@ BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
{
uint32 old_offset;
uint32 offset_ace_size;
uint8 type;
if (psa == NULL)
return False;
@ -62,9 +63,17 @@ BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
old_offset = prs_offset(ps);
if(!prs_uint8("type ", ps, depth, (uint8*)&psa->type))
if (MARSHALLING(ps)) {
type = (uint8)psa->type;
}
if(!prs_uint8("type ", ps, depth, &type))
return False;
if (UNMARSHALLING(ps)) {
psa->type = (enum security_ace_type)type;
}
if(!prs_uint8("flags", ps, depth, &psa->flags))
return False;