mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-30 15:00:22 +00:00
0d0e47c7eb
Nicolas Iooss reports: OSS-Fuzz found an integer overflow when compiling the following (empty) CIL policy: ;;*lms 2147483647 a ; (empty line) Change hll_lineno to uint32_t which is the type of the field hll_line in struct cil_tree_node where the line number will be stored eventually. Read the line number into an unsigned long variable using strtoul() instead of strtol(). On systems where ULONG_MAX > UINT32_MAX, return an error if the value is larger than UINT32_MAX. Also change hll_expand to uint32_t, since its value will be either 0 or 1 and there is no need for it to be signed. Reported-by: Nicolas Iooss <nicolas.iooss@m4x.org> Signed-off-by: James Carter <jwcart2@gmail.com> |
||
---|---|---|
.. | ||
cil | ||
include | ||
man | ||
src | ||
tests | ||
utils | ||
.gitignore | ||
COPYING | ||
Makefile | ||
VERSION |