diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-10-19 19:40:04 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-10-19 19:40:04 -0400 |
commit | ce7f6fe1268fef4f89aa21c7b44d73ecd98efe24 (patch) | |
tree | ba32caa348ecbd32af66b1709ce88df314a2508e /Xext/xselinux.c | |
parent | 12e889d202ac9849f534c51167cbfed91c32027a (diff) |
xselinux: properly update sizes when dynamic arrays are resized...
Diffstat (limited to 'Xext/xselinux.c')
-rw-r--r-- | Xext/xselinux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 8b1898dac..14a2270e2 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -143,6 +143,7 @@ SELinuxEventToSID(int type, SELinuxStateRec *sid_return) return BadAlloc; memset(knownEvents + numKnownEvents, 0, (type - numKnownEvents + 1) * size); + numKnownEvents = type + 1; } if (!knownEvents[type]) { @@ -180,6 +181,7 @@ SELinuxTypeToClass(RESTYPE type) return 0; memset(knownTypes + numKnownTypes, 0, (type - numKnownTypes + 1) * size); + numKnownTypes = type + 1; } if (!knownTypes[type]) { |