提交 85c3b529 编写于 作者: E Eric Paris 提交者: James Morris

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: NEric Paris <eparis@redhat.com>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 821d35a5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册