diff options
| author | Andrew Gallant <[email protected]> | 2013-08-11 20:54:15 -0400 |
|---|---|---|
| committer | Andrew Gallant <[email protected]> | 2013-08-11 20:54:15 -0400 |
| commit | eb7c38953b074e33f86861a3da4c05623cd44fc6 (patch) | |
| tree | 0393a0a57afb536c401afb5e3587384c282ddd00 /xselinux/xselinux.go | |
| parent | 8bc7a097c3aeddc1832d47cd74a9a365ab1f86ad (diff) | |
Padding on a list is on the length of the list.
There was a bug where padding was being computed on each element of the
list. Close #5.
Diffstat (limited to 'xselinux/xselinux.go')
| -rw-r--r-- | xselinux/xselinux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xselinux/xselinux.go b/xselinux/xselinux.go index 757a285..f24f5d7 100644 --- a/xselinux/xselinux.go +++ b/xselinux/xselinux.go @@ -115,9 +115,9 @@ func ListItemListBytes(buf []byte, list []ListItem) int { for _, item := range list { structBytes = item.Bytes() copy(buf[b:], structBytes) - b += xgb.Pad(len(structBytes)) + b += len(structBytes) } - return b + return xgb.Pad(b) } // ListItemListSize computes the size (bytes) of a list of ListItem values. |
