mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-27 20:58:52 +00:00
xselinux: properly update sizes when dynamic arrays are resized...
This commit is contained in:
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user