mirror of
https://github.com/adulau/aha.git
synced 2024-12-26 10:46:11 +00:00
SELinux: header generation may hit infinite loop
If a permission name is long enough the selinux class definition generation tool will go into a infinite loop. This is because it's macro max() is fooled into thinking it is dealing with unsigned numbers. This patch makes sure the macro always uses signed number so 1 > -1. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
821d35a560
commit
85c3b529f8
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ struct security_class_mapping {
|
|||
#include "classmap.h"
|
||||
#include "initial_sid_to_string.h"
|
||||
|
||||
#define max(x, y) ((x > y) ? x : y)
|
||||
#define max(x, y) (((int)(x) > (int)(y)) ? x : y)
|
||||
|
||||
const char *progname;
|
||||
|
||||
|
|
Loading…
Reference in a new issue