Skip to content

Commit

Permalink
Allocate appropriate memory size for PSECURITY_DESCRIPTOR
Browse files Browse the repository at this point in the history
  • Loading branch information
ckolivas committed Jan 23, 2017
1 parent 82e216b commit e491278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -3965,7 +3965,7 @@ static LPSECURITY_ATTRIBUTES mksec(const char *dname, uint8_t bus_number, uint8_
LPSECURITY_ATTRIBUTES sec_att = NULL;
PSECURITY_DESCRIPTOR sec_des = NULL;

sec_des = cgmalloc(sizeof(*sec_des));
sec_des = cgmalloc(SECURITY_DESCRIPTOR_MIN_LENGTH);

if (!InitializeSecurityDescriptor(sec_des, SECURITY_DESCRIPTOR_REVISION)) {
applog(LOG_ERR,
Expand Down

0 comments on commit e491278

Please sign in to comment.